Delta Coverage¶
Code coverage for what matters โ your changes
Delta Coverage is a tool that computes code coverage of new/modified code based on a git diff. Focus on testing what you've changed, not the entire codebase. Available as a Gradle plugin or a standalone CLI tool.
Why Delta Coverage?¶
- โก Instant Feedback
- Get coverage reports for your changes in seconds. No waiting for SonarQube scans or external service delays.
- ๐งช Testing Pyramid Support
- Separate views for unit tests, integration tests, and E2E tests. Enforce different coverage thresholds per test type.
- ๐ Free, No Infrastructure
- Runs locally and in CI. No servers to maintain, no licenses to pay, no external dependencies.
Quick Start¶
1. Apply the plugin
2. Configure diff source
configure<io.github.surpsg.deltacoverage.gradle.DeltaCoverageConfiguration> {
diffSource.git.compareWith("refs/remotes/origin/main")
}
3. Run coverage
1. Apply the plugin
2. Configure diff source
3. Run coverage
That's it! The plugin auto-discovers your test tasks, generates HTML reports, and enforces coverage on new code.
Features¶
- Two Coverage Engines โ Choose between JaCoCo (standard JVM) or IntelliJ coverage (better for Kotlin)
- Multiple Report Formats โ HTML, XML, Markdown, and Console reports
- Automatic Test Discovery โ Report views are auto-created for all test tasks
- Flexible Diff Sources โ Use file, URL, or git to provide the diff
- GitHub Actions Integration โ Post coverage reports directly to PR comments
- CLI Tool โ Run delta coverage without Gradle plugin
How It Works¶
Delta Coverage takes your test coverage data and filters it to show only the lines you've changed. This gives you actionable feedback on your work, not noise from legacy code.

What Users Say¶
"Delta Coverage made our code reviews faster. We stopped arguing about which code needs tests โ the report shows it clearly."
"Onboarding new developers is easier. They can focus on testing their changes without worrying about overall project coverage."
Get Started¶
Ready to try Delta Coverage? The Quick Start guide will have you running in under 5 minutes.
For a comparison with other tools, see Delta Coverage vs SonarQube.