Code Coverage
Code Coverage measures the percentage of application code executed by automated tests in the test suite. It indicates how comprehensively the codebase is tested and is used as a proxy for the risk of undetected bugs reaching production. Line coverage, branch coverage, and path coverage are progressively more rigorous forms of the metric.
Code coverage percentage is a necessary but not sufficient quality indicator; 80% coverage with poorly written tests is less valuable than 60% coverage with tests that verify critical business logic under realistic conditions.
- CodecovCoverage tracking, PR checks, and coverage trend reporting
- SonarQubeCode coverage with quality gate enforcement
- Istanbul / NYCJavaScript/TypeScript code coverage instrumentation
- JaCoCoJava code coverage measurement in CI pipelines
- Engineering culture and team standards for test quality
- PR review requirements enforcing test coverage minimums
- Coverage gate enforcement in CI/CD pipeline
- Legacy code debt with limited test coverage
- Time pressure on feature delivery crowding out test writing
Industry standard targets are 70%–80% line coverage; critical business logic and payment flows often warrant 90%+; legacy systems may realistically operate at 40%–60%.
How different roles think about this metric
Each function reads Code Coverage through a different lens and takes different actions when it changes.
Common Questions About Code Coverage
Click any question to expand the answer.
What is the difference between line coverage, branch coverage, and path coverage?
Is 100% code coverage a good goal?
How should I increase code coverage in a legacy codebase?
What is mutation testing and how does it improve coverage quality?
Related Metrics
Metrics that are commonly analyzed alongside Code Coverage.
Role guides that include this metric
See how each role uses Code Coverage in context with the full set of metrics they own.
Want to know what is holding your Code Coverage back?
Give us your website and we will send back the specific pages hurting your Code Coverage, in the order worth fixing. You will have it within one business day, free, with no obligation.