Test Coverage
Test coverage is a way of measuring how much of a software application has been checked by testing. Depending on the definition used, it can refer to how thoroughly the tests exercise the requirements, user scenarios, and potential risks, or more narrowly to how much of the underlying source code is actually run during testing. It is commonly used as an indicator of testing thoroughness, though a high coverage figure does not by itself guarantee that the software is free of defects.
Test coverage is a measure of the extent to which testing exercises a software system. The term is used with two distinct meanings that practitioners should not conflate. In a black-box sense, test coverage assesses the degree to which test cases cover specified requirements, user scenarios, and identified risks. In a narrower sense frequently labeled 'code coverage'—and sometimes used interchangeably with 'test coverage' in the literature (for example, in Wikipedia's usage)—it is a percentage metric quantifying the degree to which source code (such as lines, branches, or conditions) is executed during a test run. These usages differ in scope: requirements- or risk-based coverage evaluates whether intended behaviors are tested, whereas code coverage measures which code paths are exercised, and the two are not equivalent. Because the underlying evidence for this entry draws from general software engineering sources rather than AI governance or model risk management guidance, this definition is scoped to software testing and does not address model validation, model risk coverage, or regulatory testing expectations for AI systems, which may use the term differently.
Why it matters
Test coverage matters because it gives teams a tangible signal about how thoroughly a software system has been exercised by testing, helping surface untested requirements, scenarios, or code paths before they reach production. In practice, coverage figures are frequently used as a proxy for quality and as a gate in continuous delivery pipelines, informing decisions about whether a change is ready to release.
The metric is valuable precisely because it makes gaps visible, but professionals should be cautious about treating a high coverage number as evidence of correctness. As commonly understood, a high coverage figure indicates that a large portion of the code was executed or that many requirements were exercised, but it does not by itself guarantee that the software is free of defects; tests can run code without meaningfully checking its behavior, and requirements-based coverage can miss edge cases that were never identified as risks in the first place.
Because the term carries two distinct meanings—a broader requirements-, scenario-, and risk-based sense and a narrower source-code-execution sense—misreading which metric is being reported can lead to overconfidence. Teams that conflate code coverage with test coverage may believe their testing is more complete than it is, since executing a line of code is not the same as validating that the intended behavior is correct. This entry is scoped to general software testing and does not address how the term may be used differently in AI model validation, model risk coverage, or regulatory testing expectations for AI systems.
Who it's relevant to
Inside Test Coverage
Common questions
Answers to the questions practitioners most commonly ask about Test Coverage.