C/C++test CT supports the following code coverage metrics:
Follow the procedure below to collect code coverage.
cpptestcc
coverage tool; see Collecting Code Coverage for more details on cpptestcc
.cpptestcov compute
: cpptestcov compute -map=.cpptest/cpptestcc -clog=cpptest_results.clog -out=cov-data-run1 |
cpptestcov report text
.cpptestcov report text cov-data-run1 |
The basic workflow can be further extended with the following steps:
cpptestcov report html
.cpptestcov suppress
.cpptestcov report uncovered-lines
.cpptestcov merge
.cpptestcov report dtp
.cpptestcov report lcov
.cpptestcov report cobertura
.See Tools and Commands Reference for details on these commands.