Code Coverage in Testwell CTC++

Code coverage is a measure on how thoroughly the program code has been exercised during test. The definitions of different coverage levels Testwell CTC++ is using are described here.

Testwell CTC++ offers multiple coverage measures to evaluate code coverage. Some of these coverage measures, namely function coverage, decision coverage, multicondition coverage can be chosen as instrumentation modes in the preprocessor of Testwell CTC++. The other coverage measures are obtained with ctcpost.



For these coverage levels, a Test Effectiveness Ratio (TER) is calculated. It is a percentage referring to the measure points taken into account by Testwell CTC++ for the respective coverage level. TER is always truncated to an integer.

The diagram above shows a hierarchy of coverage levels in the following sense: From 100% decision coverage, for example, follow 100% statement coverage. For TER values below 100%, no such dependency holds true in general.

In the HTML report, line coverage is given as a visual indication if a line has been executed or not.