Test Runs with the Instrumented Program

The instrumented program is tested without any change necessary. The coverage data is written out during the execution.

The instrumented program has the name that you have selected it to have, usually the same as the original program had (normally the instrumented program overrides the original one). If the program handles command-line parameters, they are fully handled by your code. By all means the instrumented program can also be a GUI program. The instrumented code can also be in a library, which is used by some non-instrumented code.

Tests are run with the instrumented program, with one or more instrumented source files. The Testwell CTC++ run-time library has also been linked into the instrumented program.

The external behavior of the instrumented program is the same as with the original non-instrumented program. There is only a small overhead (program size and execution speed, depending on what instrumentation modes have been selected, generally quite modest) that the instrumentations introduce. When the program code visits the instrumented functions, the inserted probes collect execution counters into main memory.

When the program execution ends normally, the run-time library automatically writes the execution counters from main memory to data file(s). There are different ways to trigger the coverage data write-out also at other times than at program’s normal end.

The data files are, together with the symbol files, the basis to prepare coverage reports.