Code Coverage
For embedded software development projects, code coverage has always played an important role in order to show that all parts of the code have been tested. In particular, the ISO 26262 standard requires fulfilling coverage metrics such as statement coverage, decision coverage or MC/DC.
Despite the analysis of code coverage being performed in most development projects, the handling is often inefficient. As the code coverage is mostly measured during test execution using instrumented code, the user must explicitly run all tests in order to obtain the desired metrics. Further, the tests typically need to be executed again on the non-instrumented code in order to obtain the test results for the code that goes into production.
Code coverage in BTC EmbeddedTester – Integrated, automated and certified
The coverage report is structured into three main sections. While the first section provides an overview of the different metrics, the second contains a detailed list of all individual coverage goals. The third section shows the source code including additional information regarding the coverage status of each code line.
If the production code has been generated by dSPACE TargetLink, the code coverage report also provides traceability to the original model, making the corresponding model element for a particular coverage goal easily identifiable.
We’ve got you covered
The “Domain Coverage” goal allows you to flexibly define slices of variables data range as individual coverage goals, e.g. in order to address the ISO 26262 objectives for equivalence classes. The robustness goals like “Range Violation”, “Division by 0” or “Downcast” provide information regarding critical events in the code that should ideally not be reachable.
Intelligent analysis and automatic test generation for structural coverage goals
BTC EmbeddedTester not only calculates the achieved coverage for test data that has been imported or manually created. Powerful analysis engines based on Model-Checking technology are further able to analyze all coverage goals fully automatically and generate corresponding structural test data to achieve full coverage. For code parts that can’t be covered, the tool provides mathematical proof to show that they are unreachable. This allows you to reveal dead code for structural goals, while for the robustness goals it proves that the corresponding critical event can never occur.