formalmethods.dev

§ 1.7

Coverage as a negative metric

Coverage tells you what you didn't test. Never what you did.

see also · Specification-based test generation · Model checking

■ exercised  ▨ never reached — coverage proves these gaps, nothing else

Measured honesty

Coverage answers one question with perfect precision: which states and transitions did my tests never reach? Run your traces; the report lists every miss. Uncovered means no test exercised it — a fact.

The trap is reading it backwards: 100% coverage means every edge fired once, not that every behaviour was tested. Coverage is a checklist of remaining work, never a certificate of correctness.

Spec coverage

The second axis: requirement coverage — does every clause of the spec have a test that would fail if the clause were broken? If the model can violate the property, make sure a test drives it there — or let the model checker: its counterexamples are pre-loaded failing tests.

try it · measure what tests missed — lab D →