Skip to content

Test coverage

The share of an explicitly defined set, such as executable statements or requirements, that has been tested.

Also known asCode coverage
Software quality

Read the proportion with a clear denominator

Test coverage relates checked elements to a defined total set. For code coverage, these can be executable statements or branches. Requirements coverage instead considers named requirements. These measures are not freely interchangeable.

In a fictional calculation, tests execute 10 of 20 executable statements: 10 / 20 × 100 = 50 % statement coverage. This does not say whether results were meaningfully checked or all important inputs occurred. Executing all code still does not prove that tests check correctly or that every requirement is implemented. Compare only the same metric and scope, and investigate business-relevant gaps behind the number.

Sources