A powerful Chrome extension that seamlessly integrates code coverage information directly into your GitHub workflow. Transform your code review process by instantly visualizing test coverage on Pull Requests and individual files, helping teams make informed decisions about code quality and testing gaps.
- 📊 PR Coverage Display: Get instant coverage insights on GitHub Pull Request pages with comprehensive statistics and visual indicators
- 🎯 File Coverage Highlighting: See exactly which lines are covered with intuitive color-coded highlighting in GitHub file views
- ⚙️ Fully Configurable: Works with any organization's repositories and coverage report formats
- 🔄 Real-time Updates: Automatically refreshes coverage data when navigating between PR files
- 📈 Coverage Diff: Compare coverage changes between base and head branches to track testing improvements
- 🚀 Zero Setup Friction: Easy configuration through a user-friendly options panel
See comprehensive coverage statistics and file-by-file breakdown directly on your PR pages:
Instantly identify covered and uncovered lines with clear visual indicators:
- Download or clone this repository
- Open Chrome and navigate to
chrome://extensions - Enable "Developer mode" in the top right corner
- Click "Load unpacked" and select the extension directory
- Configure the extension for your organization (see Configuration section)
-
Clone this repository:
git clone https://github.com/your-username/code-coverage-viewer.git cd code-coverage-viewer -
Load the extension in Chrome:
- Open
chrome://extensions - Enable "Developer mode"
- Click "Load unpacked" and select the project directory
- Open
-
Make changes and reload the extension from
chrome://extensions
After installation, you need to configure the extension for your organization:
- Right-click the extension icon and select "Options"
- Fill in your organization's details:
- Organization Name: Your GitHub organization or username
- Allowed Repositories: List of repository owners where the extension should work
- Coverage Reports Repository: Where your coverage reports are stored
- Extension Display Name: Customize the extension name
- GitHub Origin URL: Your GitHub instance URL
Organization Name: my-company
Allowed Repositories:
my-company
my-company-ops
Coverage Reports Repository: my-company/coverage_reports
Extension Display Name: Code Coverage Viewer
GitHub Origin URL: https://github.com
Your coverage reports should be stored in a GitHub repository with this structure:
coverage_reports/
├── repo-name/
│ └── branch-name/
│ ├── artifact-coverage-results.json
│ └── files.txt (optional, for multiple test types)
└── another-repo/
└── main/
└── artifact-coverage-results.json
The artifact-coverage-results.json file should contain:
{
"source_files": [
{
"name": "path/to/file.js",
"coverage": "[null, 1, 0, 2, null, ...]"
}
]
}Where:
null: Non-executable line0: Uncovered executable line>0: Covered executable line (number indicates hit count)
├── manifest.json # Extension manifest
├── options.html # Configuration page
├── js/
│ ├── config.js # Configuration management
│ ├── contentController.js # Main orchestrator
│ ├── githubData.js # Data fetching logic
│ ├── githubPRSummaryUI.js # PR summary UI
│ ├── githubPRFilesUI.js # PR files UI
│ ├── githubBlobUI.js # File view UI
│ ├── options.js # Options page logic
│ └── background.js # Background script
├── css/
│ ├── style.css # Main styles
│ └── options.css # Options page styles
└── assets/ # Icons and images
- Configuration System: Manages organization-specific settings
- Data Layer: Fetches and processes coverage reports
- UI Layer: Displays coverage information on GitHub pages
- Background Script: Handles extension lifecycle events
- Fork the repository
- Create a feature branch:
git checkout -b feature-name - Make your changes and test them
- Commit your changes:
git commit -am 'Add feature' - Push to the branch:
git push origin feature-name - Submit a pull request
This project is open source and available under the MIT License.
- Check that your organization is listed in "Allowed Repositories"
- Verify your coverage reports repository is accessible
- Ensure coverage reports follow the expected format
- Check the browser console for error messages
- Verify the coverage reports exist for the specific branch
- Check that the file paths in coverage reports match GitHub file paths
- Ensure the coverage reports repository is public or accessible
Open an issue on GitHub with:
- Your configuration (without sensitive information)
- Browser console errors
- Steps to reproduce the problem
- 🔍 Instant Visibility: No more switching between tools - see coverage directly where you review code
- 👥 Team Collaboration: Help your team identify testing gaps during code reviews
- 📊 Data-Driven Decisions: Make informed choices about which code needs more testing
- ⚡ Seamless Integration: Works with your existing GitHub workflow without disruption
We welcome contributions! Whether it's bug fixes, new features, or documentation improvements, your help makes this tool better for everyone. Check out our Contributing Guide to get started.
If this extension helps improve your development workflow, please consider:
- ⭐ Starring this repository
- 🐛 Reporting bugs or suggesting features
- 📢 Sharing it with your team
- 🤝 Contributing to the codebase
Happy coding with better coverage visibility! 🚀

