Aerospace, automotive, industry, rail, medical, agricultural machinery, nuclear: each functional safety standard sets its own coverage requirements. Here, standard by standard, are the levels required according to the criticality of the software, and what they have in common.
The figures differ, but the logic is the same everywhere.
The more serious a failure would be, the more demanding the required coverage: statements for the least critical software, up to MC/DC for the most critical.
Coverage is used to assess the tests written from the requirements. It shows what they did not execute; it does not replace those tests.
Whatever remains uncovered is dealt with: one more test, a completed requirement, deleted code, or a written justification handed to the audit.
In ISO 26262, IEC 61508 or EN 50716, a highly recommended method that is not applied must be justified. In practice, it is expected.
For the levels themselves (statement, decision, condition, MC/DC), see coverage levels.
For each standard, its criticality levels and what the most demanding one requires.
| Standard | Levels | At the most critical level |
|---|---|---|
| DO-178CAerospace | A to E | MC/DC, decision and statement coverage, at level A |
| ISO 26262Automotive | ASIL A to D | MC/DC and branch coverage highly recommended, at ASIL D |
| IEC 61508Industry | SIL 1 to 4 | MC/DC, branch, statement and entry point coverage highly recommended, at SIL 4 |
| EN 50716Rail | Basic integrity, SIL 1 to 4 | Branch and compound condition, or branch and data flow, or path coverage, at SIL 3 and 4 |
| IEC 62304Medical | Classes A, B, C | No level imposed: the manufacturer sets its criteria |
| ISO 25119Agricultural machinery | SRL B, 1, 2, 3 | Entry point, statement and branch coverage, at SRL 2 and 3 |
| IEC 60880Nuclear | Category A | All lines of code, and all module calls at integration (common position of the safety authorities) |
Airborne software is classified from level A, catastrophic failure, to level E, no effect. Structural coverage is required at 100% from level C upwards.
| Level | Structural coverage required |
|---|---|
| A | MC/DC, decision and statement coverage; data coupling and control coupling; verification of object code that is not directly traceable to the source code |
| B | Decision and statement coverage; data coupling and control coupling |
| C | Statement coverage; data coupling and control coupling |
| D and E | No structural coverage |
Data coupling and control coupling analysis checks that the tests exercise the data exchanges and call dependencies between the software components. Tool qualification is covered by a separate document, DO-330. The DO-178C page
Part 6 of ISO 26262 (2018 edition) recommends coverage according to the ASIL, from A, the least demanding, to D, at two test levels.
| Coverage | ASIL A | ASIL B | ASIL C | ASIL D |
|---|---|---|---|---|
| Software unit testing | ||||
| Statement | ++ | ++ | + | + |
| Branch | + | ++ | ++ | ++ |
| MC/DC | + | + | + | ++ |
| Integration testing (software architecture) | ||||
| Function | + | + | ++ | ++ |
| Call | + | + | ++ | ++ |
++: highly recommended. +: recommended.
At ASIL C and D, statement coverage is only recommended: it is included in branch coverage, which is highly recommended. The standard sets no percentage: coverage judged insufficient calls for additional tests or a justification. The ISO 26262 page
The basic functional safety standard, from which several sector standards derive. Part 3 (2010 edition) recommends 100% coverage according to the safety integrity level, from SIL 1 to SIL 4.
| 100% coverage | SIL 1 | SIL 2 | SIL 3 | SIL 4 |
|---|---|---|---|---|
| Entry points | ++ | ++ | ++ | ++ |
| Statements | + | ++ | ++ | ++ |
| Branches | + | + | ++ | ++ |
| MC/DC | + | + | + | ++ |
++: highly recommended. +: recommended.
When 100% cannot be achieved, for instance because of defensive code, the reason must be explained. The IEC 61508 page
Published in 2023, EN 50716 replaces EN 50128 and EN 50657 for railway software. In addition to statement and branch coverage, it lists compound conditions, data flow and paths.
| Coverage | SIL 1 | SIL 2 | SIL 3 | SIL 4 |
|---|---|---|---|---|
| Statement | ++ | ++ | ++ | ++ |
| Branch | + | + | ++ | ++ |
| Compound conditions | + | + | ++ | ++ |
| Data flow | + | + | ++ | ++ |
| Path | + | + | ++ | ++ |
++: highly recommended. +: recommended.
At SIL 3 and 4, the standard requires a combination at component level: branch and compound conditions, or branch and data flow, or path; or, at integration level, one or more of these criteria. Other criteria may be used if they are justified. The EN 50716 page
IEC 62304 classifies medical device software into three classes, from A, no injury possible, to C, death or serious injury possible. It imposes no coverage level: the manufacturer sets its own acceptance criteria for its software units, with additional criteria for class C, and must be able to defend them.
For the US market, the FDA guidance on software validation (General Principles of Software Validation) considers decision coverage a minimum level for most software products, and insufficient on its own for high-integrity applications.
Aiming at least for decision coverage, as the FDA suggests, and more for class C, gives a criterion that is easy to defend. The IEC 62304 page
ISO 25119 applies to tractors and machinery for agriculture and forestry. Its software requirement level, the SRL, ranges from B to 3. For software component testing, part 3 requires, at SRL 2 and SRL 3, proof of structural coverage of the source code: entry points, statements and branches.
It does not explicitly require 100%: the target is to be set and justified in the project. The ISO 25119 page
IEC 60880 governs the software of category A systems in nuclear power plants, those that perform the most important safety functions. The expectations of the European nuclear safety authorities are set out in their common position on the licensing of safety critical software (Licensing of safety critical software for nuclear reactors).
In its 2013 edition, this document requires the tests to exercise all lines of code and, at system integration, all module calls, with a coverage analysis to justify it. It also requires testing the boundaries of every input variable, the error handling mechanisms and access to all data items. The IEC 60880 page
A coverage tool that got it wrong would make the tests look complete. The standards therefore require making sure it can be trusted.
ISO 26262, IEC 61508, EN 50716 and DO-178C, with DO-330, require each tool to be assessed according to the risk it introduces, then qualified if necessary.
A certificate issued by a body such as TÜV SÜD, with its safety package, saves you from repeating the demonstration yourself.
The certificate applies to a use described in the tool's safety manual: that is the framework to follow on the project.
Testwell CTC++ measures every level required by these standards on C and C++ code (Java as an option), from function coverage to MC/DC and multiple condition coverage:
TiCS takes in the coverage measured by Testwell CTC++ or by another coverage tool:
Not strictly, but a highly recommended method that is not applied must be justified, and the assessor will examine that justification. In practice, it is applied.
DO-178C and IEC 61508 aim for 100%, explaining what cannot be covered. ISO 26262, IEC 62304 and ISO 25119 set no percentage: the target is defined and justified on the project.
On requirements-based tests: unit tests for statement, branch and MC/DC coverage, integration tests for function and call coverage. Tests written only to push the figure up prove nothing.
No, but it must be assessed, and qualified if its risk level requires it. A certificate such as that of Testwell CTC++ lightens this work for the standards it covers.
Coverage is measured on the source code. At level A, DO-178C also requires verifying the code that the compiler adds with no direct link to the source.
IEC 62443 and ISO/SAE 21434 deal with cybersecurity and are not covered in this guide; see the IEC 62443 and ISO/SAE 21434 pages.
A free trial of Testwell CTC++ on your own C or C++ code, on the host or on the embedded target.
Code coverage · Coverage levels · MC/DC · Certification · Standards · Learn
Sources: RTCA DO-178C / EUROCAE ED-12C (2011); ISO 26262-6:2018; IEC 61508-3:2010; EN 50716:2023; IEC 62304:2006+A1:2015; ISO 25119-3:2018; FDA, General Principles of Software Validation (2002) ↗; European nuclear safety authorities, Licensing of safety critical software for nuclear reactors (2013) ↗. The standards define their requirements in detail: refer to their text for your project.