Justification of Missing Coverage
In real-life test situations, 100% coverage is hardly achieved for several reasons. You can justify missing coverage with Testwell CTC++, using structured comments in source code or justifications collected in text files.
- function begins
- true or false
branches of
ifstatements - cases of a
switchstatement - for a composite decision
(a && b), the counter for(T && F)might be justified
The justifications provided are documented in the HTML report. For all coverage measures, the impact of justifications is calculated. Hence a clear indication is given if "everything" was tested or at least justified.
For dependent coverage counters, statements and lines, the property to be justified is
derived by ctcreport. In the following piece of code, the
default counter is justified by the user. The two statements below
and the break counter are in consequence also justified:

Please note that there is an exception for ternary-? operators: They can be justified directly, but justifications are not passed to their counters.