Code Coverage

When it comes to dynamic testing, code coverage plays an important role as criterion if the done testing was sufficient. This way, so-called “dead code” and also not yet tested code can be detected. There are different code coverage criteria like Condition coverage, Decision coverage, or Modified Condition/Decision coverage in different forms. To measure code coverage, the source code has to be instrumented. This means, a counter has to be implemented on the branch points.

Code coverage measurement in TPT is only indirectly possible by means of other tools like CTC++,
Gcov, or Verification and Validation Toolbox (V&V-Toolbox) for Simulink or TargetLink models.

The code coverage in TPT can be documented in the TPT report.


Code Coverage: CTC++ with the Executable platform in TPT [9,7 MB]

TargetLink production code coverage

TPT supports the code coverage of TargetLink production code via TargetLink by dSPACE or CTC++
by Testwell.

Measure the coverage of Simulink models

TPT supports the coverage measurement of Simulink models via the tool Verification and Validation Toolbox (V&V-Toolbox)
by Mathsworks.

In TPT in the MATLAB platform configuration, you can choose TargetLink, CTC++ for TargetLink, or Simulink V&V as code coverage tools; or you write your own script.
Code Coverage: CTC++ with ASCET in TPT [8,4 MB]

Measure C-code coverage

TPT supports directly the coverage measurement by tools like CTC++ and Gcov that are responsible for the instrumentation and the measurement. The results are directly presented inside the TPT report and are linked to the detailed reports.

To observe the test coverage of C-code, you can use CTC++ or GNU gcov directly from within TPT.

Other coverage tools

TPT can also work together with each other coverage tool. In this case, the configuration can't be done in TPT. The reporting won't also be a part of the TPT report.

Copyright © www.piketec.com    All rights reserved

Follow us