Coverage measures the extent of test execution. Key points:
Types:
Calculation:
- (Executed items / Total items) * 100
Tools:
- JaCoCo
- Istanbul
- Cobertura
Benefits:
- Identifies untested code
- Guides test case development
- Measures testing thoroughness
Limitations:
- High coverage doesn’t guarantee quality
- Some code may be intentionally uncovered
Coverage metrics help assess and improve testing effectiveness.
