Follow the procedure below to collect code coverage.

  1. Instrument and build your code with the cpptestcc coverage tool; see Integrating Code Coverage with Project Build.
    This step produces .map files required for coverage data files generation.
  2. Execute the instrumented application. See Executing Instrumented Application.
    This step produces a .clog file required for coverage data files generation.
  3. Generate coverage data files using cpptestcov compute:  
    cpptestcov compute -map=.cpptest/cpptestcc -clog=cpptest_results.clog -out=cov-data-run1

    This step produces coverage data files used for generating reports.

  4. Report coverage statistics using cpptestcov report text.
    cpptestcov report text cov-data-run1

The basic workflow can be further extended with the following steps:

See Tools and Commands Reference for details on these commands.