Code coverage measures which important paths automated tests exercise. Meaningful coverage includes core business logic, edge cases, invalid inputs, and expected failures—not merely a high percentage. section 9.3
Use coverage to check whether tests address:
- Normal success behavior and core business logic. section 9.3
- Edge cases and invalid input. section 9.3
- Expected failures, including security-related cases. section 9.3
- Gaps that require judgment rather than automatic pursuit of a metric. section 9.3
Cover both branches
A pounds-to-kilos converter needs tests for a valid value, zero, and a negative value that throws an exception. Together, these tests exercise conversion, a boundary case, and the failure path. section 9.3













