© 2023 Synopsys, Inc. All Rights Reserved.
For white box or structural tests, the internal structure of the software is relevant and must be analyzed. This can be done either by manual or automated analysis. For manual analyses, the tester needs to have extensive programming experience. Test cases are derived from the internal structure, which preferably cover the entire structure of the software by stimulating the inputs. Coverage criteria such as condition coverage, decision coverage, modified condition/decision coverage (MC/DC), path coverage, interface coverage and function coverage are measures for the completeness of the coverage.
Coverage tests can be performed in module tests as well as in software tests, whereby test case creation in earlier phases is easier with smaller software modules than with large integrated software.
Test case creation in TPT systematically specifies input signals and function calls of the software.
The coverage measurement is performed during or after the test execution. In an iterative process, the ideal coverage is thus approached by creating more and more test cases, which leads to an ever better coverage. During this process one finds potentially unreachable dead code, badly structured code or unspecified behavior of the test object.
It is recommendable to start with functional requirement-based tests, equivalence class tests, etc., and only do the structural tests at the end. Coverage tests can also reveal specification gaps or incorrect implementations in this way.
The time-consuming manual process can be simplified by automation.
The automatic test case generation for optimal code coverage in TPT is called TASMO. TASMO automatically generates test cases that cover as much condition coverage and decision coverage as possible with as little effort as possible. With TASMO, you can generate additional test cases in addition to your manually created test cases, saving you time and ensuring complete coverage.
TASMO can be used for Simulink and TargetLink models or for C code.
To automatically measure code coverage, an instrumentation of the source code is required. For optimal coverage measurement, we recommend Mathworks Coverage Toolbox for Simulink models. For C code, we recommend using CTC++ , Gcov, GCOV-R or TargetLink in case of dSpace TargetLink usage.
For all tools there are suitable interfaces in TPT. The measurement results are automatically displayed in the TPT report.
TPT supports the coverage measurement of Simulink models via the Coverage Toolbox by Mathworks.
TPT supports the code coverage of TargetLink production code via TargetLink by dSPACE or CTC++ by Testwell.
TPT supports directly the coverage measurement by tools like CTC++ and Gcov that are responsible for the instrumentation and the measurement.
TPT can work together with any other coverage tool. In this case, the configuration cannot be done in TPT and the results of the coverage will not appear in the TPT report.