Svashasan Logo
Simulated data

Simulation, Testing and Validation · Test metric

Test Coverage

Also known as code coverage, structural coverage, requirements coverage, scenario coverage, MC/DC

IntermediateSource-checked · awaiting technical reviewLast reviewed 6 December 2026

A measure of how thoroughly a test suite exercises its target, such as code structure (statements, branches, conditions), requirements, or the scenario and ODD space, usually expressed as the percentage of items covered.

Explanation

Coverage has several meanings. Requirements coverage records which requirements have tests. Structural coverage records how much code those tests execute; NASA's MC/DC tutorial describes structural coverage analysis as determining how much of the code structure was executed by the requirements-based tests. For automated driving, ISO 34505:2025 includes criteria for evaluating test cases, among them coverage of functional and technical requirements and of the operational domain.

The common structural criteria, as defined in the tutorial: statement coverage requires every executable statement to run at least once and is considered weak; decision coverage requires each decision to evaluate both true and false; modified condition/decision coverage (MC/DC) requires each condition to be shown to independently affect the decision's outcome, generally needing at least n+1 tests for n conditions. ISO 26262-6:2018 Table 9 rates statement coverage highly recommended for ASIL A and B, branch coverage for ASIL B to D, and MC/DC for ASIL D.

Full coverage does not prove correctness: it cannot reveal missing functionality, and uncovered code may indicate dead code or missing requirements. Scenario coverage figures depend entirely on how the scenario space is parameterised.

How it works

Code is instrumented by the compiler or a coverage tool, the requirements-based tests are run, execution data is collected and coverage metrics are computed per unit. Uncovered items are analysed and either addressed with new tests, justified, or removed as dead code. For scenarios, the parameter space or ODD attributes are discretised and the tested combinations are tracked against that grid.

Automotive applications

  • ISO 26262 software unit verification
  • Finding untested or dead code
  • Scenario and ODD coverage arguments for ADS
  • Assessing test-suite adequacy in CI

Example

For the decision (brakePedal OR aebRequest), tests (T,F), (F,T) and (F,F) achieve MC/DC, because each input is shown to flip the outcome on its own. Decision coverage alone is met by (T,F) and (F,F), which never demonstrates the effect of aebRequest.

An illustrative example: any figures in it are worked numbers, not measurements.

References

  1. A Practical Tutorial on Modified Condition/Decision Coverage (Hayhurst, Veerhusen, Chilenski, Rierson), NASA/TM-2001-210876 (opens in a new tab)

    NASA Langley Research Center · Publication · 2.2.2 Structural coverage analysis; 2.3 coverage criteria · retrieved 6 December 2026

    “requiring that each condition be shown to independently affect the outcome of the decision”
  2. Following the ISO 26262-6:2018 Guidelines with VectorCAST (whitepaper V3.0, 2021-02) (opens in a new tab)

    Vector Informatik · Manufacturer documentation · ISO 26262-6:2018 Table 9 as reproduced · retrieved 6 December 2026

  3. ISO 34505:2025 Road vehicles - Test scenarios for automated driving systems - Scenario evaluation and test case generation (opens in a new tab)

    ISO · Standard · Abstract; obtained via web search because iso.org blocked direct fetch · retrieved 6 December 2026

Definitions are original summaries. Standards text is not reproduced; follow the links for the official publications.