Layout Configuration

The HTML report of Testwell CTC++ can be adapted to the structure and size of the reported project. For this purpose, layout configurations are defined in ctcreport-layout.ini.

Structure Elements

The HTML report consists of three different structure elements: one overview page, detail pages, and source code views. For overview and detail pages, the reported entities can be chosen (Directories, Files, Functions).

Overview
One overview page is always generated. On one or two aggregation levels, coverage is shown for the entities chosen (e.g. for directories and files). The overview page also contains general information about the report, like input files used, report generation time etc.
Detail Pages
Optionally, detail pages can be generated for a selected entity (e.g. files), also providing one or two levels of granularity (e.g. functions). One detail page per selected entity is generated. This entity shall also appear on the overview page, so that a link is provided for each detail page.
Source Code Views
Optionally, one page per source file is generated showing the source code annotated with coverage information. All occurences of the file and its functions on overview and on detail pages are linked to this source code view.

Layout Configuration

Different layouts are configured in the configuration file ctcreport-layout.ini located in ctcreport folder of the Testwell CTC++ directory.

[D: For deeply structured projects]
OVERVIEW = Directories, Files
DETAIL_PAGES_FOR = Directories
DETAIL_PAGES = Files, Functions
SOURCE_CODE = ON
                
[S: For small projects - files and functions on one page]
OVERVIEW = Files, Functions
DETAIL_PAGES_FOR = OFF
SOURCE_CODE = ON

...
Each block defines one layout. The head of a block
[X: Description]
consists of the parameter X to be used with option -html in a ctcreport call and a description of the layout. Parameters and descriptions are shown with ctcreport -h. The first block in ctcreport-layout.ini is the default layout.

The configuration parameters are

OVERVIEW = Entity1[, Entity2]
Defines the entities shown on level 1 and, optionally, level 2 of the overview table.
DETAIL_PAGES_FOR = OFF | Entity
If detail pages shall be generated, this parameter defines the entity. To get access from overview page to the detail pages, the entity shall be entity 1 or entity 2 chosen in OVERVIEW.
DETAIL_PAGES = Entity1[, Entity2]
If DETAIL_PAGES_FOR not set to OFF, this parameter defines the entities shown on level 1 and, optionally, level 2 of the detail pages' tables.
SOURCE_CODE = ON | OFF
Decides if the source code views are generated or not.

Available entities are: Directories, Files, Functions.