General Working Principles

Testwell CTC++ measures Code Coverage for desktop / host applications and for embedded software. It works in three fundamental steps: instrumenting, testing and reporting.

For embedded software, Testwell CTC++ provides two different approaches to measure coverage on the target: HOTA and BITCOV.

With HOTA (Host-Target), an adaptable runtime is delivered to write coverage data to the target or to the host. This runtime code has to be compiled with the cross-compiler in use.

With BITCOV, the runtime is omitted completely. Instead of counters, only the binary information if a measure point was executed or not is recorded to reduce memory consumption.

This overview shows schematically the workflow and the differences between the approaches.

Standard / Desktop HOTA BITCOV
Initially: Adapt and compile the runtime.
Instrumenting

Build an instrumented test executable (with the standard runtime for the OS)

Build an instrumented test executable with the HOTA runtime.

Define the counter array.

Build an instrumented test executable (without any runtime).

Testing

Execute tests.

Data file(s) (MON.dat) are generated.

Execute tests.

Data file(s) in text format (MON.txt) are generated.

Execute tests.

Dump coverage data from main memory.

Convert to MON.dat. Convert to MON.dat.
Reporting Generate structured HTML reports or single-file text formats with ctcreport.