Options of ctcreport

The following command-line options are available for ctcreport.

-h, -H [search-term]
Option -h gives a short help of the available options. Additionally, it shows all layouts configured in ctcreport-layout.ini and all templates available in ctcreport folder.
Option -H opens the tool page of ctcreport in Testwell CTC++ Help. When followed by a search term, the search function of Testwell CTC++ Help is opened with this term instead.
symbol and data files
Any number of symbol and data files (*.sym and *.dat). To denote both a symbol and a data file, use the file name without extension. If completely omitted, MON.sym and MON.dat are used.
If used, symbol and data files must be the first parameters.
-measures x,y,...
Any combination of mcdc, m, c, d, s, f in a comma-separated list without spaces. Chooses the coverage measures and their order.
If omitted, the coverage measures reported correspond to the instrumentation mode of the source files involved: MC/DC, decision and function coverage are reported if there is a file instrumented for multicondition, decision or function coverage, respectively. Statement coverage is reported by default.
-html layout
For structured HTML reports only. Specifies the layout from ctcreport-layout.ini. When -html is omitted, the first layout is used. See Layout Configuration for a feature description.
-D ProjectName=MyProjectName
Specifies the user's project name shown in the report.
-o output-dir | output-file
For structured HTML reports, specifies the name of the output directory. Default is CTC-HTML-REPORT.
For single-file text reports, specifies the output file. If omitted, default is ctc-coverage with file extension taken from the template.
-t threshold
Specifies the coverage threshold as an integer (0...100). In the report, it is visible for each entity and each measure if the coverage ratio reaches the threshold (in percent). Default is 100.
-template name | file-with-extension
With name, a template with matching file name located in folder ctcreport in the Testwell CTC++ directory is used. With file-with-extension, a template located somewhere else can be used. Default is html_template. See Reporting Templates as reference for templating.
-map-source-identification anchor,search-path
Maps one or more source file identifications recorded by ctc during instrumentation to a directory structure containing the source files when calling ctcreport.
The anchor and everything left of it is replaced by search-path. The report is generated with the new directories and pathes resulting from this mapping. Two or more source files instrumented with different locations can be identified on that way.
Example: With these source identifications in the symbol file
Z:\artificial\build\path\2382381\projectX\src\reader\read.c
Z:\artificial\build\path\2382381\projectX\src\reader\theReadHeader.h
Z:\artificial\build\path\18281828\projectX\src\reader\readMore.c
Z:\artificial\build\path\18281828\projectX\src\reader\theReadHeader.h
and the mapping -map-source-identification "projectX,C:\Users\Jon Doe\dev-projects\X", the three (!) different files are found on Jon Does environment. All coverage data collected for theReadHeader.h is combined.
-shorten-path match[,replace]
Shortens long paths to source files for display. The path fragment defined in match is cutted from the left and, optionally, replaced with a fragment defined in replace.
Example: -shorten-path "C:\Users\Jon Doe\dev-projects\".
The directory structure itself is not changed: If two directories get the same path after -shorten-path is applied, they are still reported as two different entities.
-shorten-path is applied after -map-source-identification.
-restrict-to-files list
Restricts the report to the source files on the list. Entries in the list are separated with commas. "*" can be used as wildcard. Directly instrumented files and included files are treated the same.
By default, all files mentioned in one of the input symbol files are reported.
-exclude-files list
Excludes the source files from the report. Directly instrumented files and included files are treated the same.
-include-justifications [file-list]
Justifications for missing coverage are included in the report. With the option itself, justifications from code comments starting with CTC++ Justify are included. With the file list, justification files (separated with comma) can be provided additionally. See Justification of Missing Coverage for a feature description.
-nsb
For structured HTML reports, the standard browser is started automatically with the report generated. This option suppresses this behavior.
@option-file
All options or parts of them can be handed over with an option file, separated with blank space or with line breaks, for example:
-measures mcdc,m,d,s
-o MY_REPORT
-include-justifications