The Report Generator ctcreport

With ctcreport, coverage reports in structured HTML format or in a single-file text format are generated from symbol and data files.

The structured HTML report shows aggregated coverage information for functions, files and directories as well as an annotated copy of the source code. The source code view shows coverage counters for all instrumentation probes and detail information for more complex coverage measures like MC/DC. Different layouts corresponding to project structure and size can be chosen.

All HTML generation is provided by a template containing HTML, JavaScript and CSS.

Single-file text formats are also based on templates and can contain coverage information for directories, files and functions - functions are the smallest entity in this case. Examle templates for XML, CSV and Markdown are provided in the installation package, adaptable by the user.


ctcreport [symbol and data files] [options]

See Options of ctcreport for details.


Call without any options - Generates an HTML report from MON.sym and MON.dat in current directory with default layout. The output directory is CTC-HTML-REPORT. Coverage measures are derived from instrumentation mode:


A report in default folder CTC-HTML-REPORT with MC/DC, decision and statement coverage for one symbol file MON.sym and two data files from unit / integration tests. The default layout is used:

ctcreport MON.sym unittest.dat integration.dat -measures mcdc,d,s

A small project called "Tiny Bot" contains all source files in one directory. A suitable layout is chosen1. Function and multicondition coverage are reported, output folder is HTML-4711:

ctcreport -measures f,m -html S -D ProjectName="Tiny Bot" -o HTML-4711

A report with a coverage threshold set to 85%. Justifications for missing coverage shall be calculated and shown in the report. A companion file HIL-justies.txt is provided additionally to the justifications in Source Code:

ctcreport -t 85 -include-justifications HIL-justies.txt

A CSV file is generated from a template located in ctcreport folder:

ctcreport -template example_csv -o my_coverage.csv
1 If the delivered layout block in ctcreport-layout.ini was not changed