= Test coverage
<Test coverage> measures which selected program elements a test run exercises. Statement coverage counts executed statements; branch coverage counts executed control-flow alternatives. Exercising both sides of a conditional can reveal gaps missed by statement coverage, but even full branch coverage need not exercise all paths or meaningful value combinations. Coverage records execution, not whether assertions checked the right behaviour. A suite that calls every <function> and verifies nothing can have impressive coverage while failing to detect wrong results.
Back to article page