The HTML Template

The HTML structure of the HTML report is defined as a template. Typically, this template does not need to be adapted by the user.

The template delivered with Testwell CTC++ provides an HTML structure together with CSS and Javascript functions for sorting and expanding, for example. It works with every Layout Configuration.

The template is adaptable by the customer / user. Beyond small adaptions like different CSS styles, it is recommended to get in contact with Verifysoft. If you adapt a template, make a copy and keep the original one.

Templates are delivered and read by ctcreport as ZIP archives. The default template, is located in the folder ctcreport of the Testwell CTC++ directory.

Composition of an HTML template

An HTML template consists of three mandatory HTML files:
The overview page is generated from this template file. In the report, it is named index.html.
All detail pages are generated from this template file, named detail-<n>.html.
The source code views are generated from this template files, named source-<n>.html.

Optionally, additional resources like logos, icons, CSS files and JavaScript files may be provided. All additional resources are copied as they are to the output directory, keeping the folder structure from the template.

HTML content

Each of the three template HTML files uses
  • Standard HTML elements.
  • Variables enclosed in $...$ filled with content by ctcreport.
    <span class='Hits'>$Hits$</span>
  • Named loops indicating repetitive parts. Variables usually have a local meaning inside loops.
    <!-- CTC_LOOP("Symbolfiles") -->
      <span class='FileName'>$FileName$</span>
      <span class='Timestamp'>$InstrumentationTime$</span>
    <!-- CTC_LOOP_END("Symbolfiles") -->
  • Conditional definitions of variables. The variable $_Entities$ is defined in this example, depending on the condition Level2Available.
    <!-- CTC_DEFINE("_Entities"
                    "$Level1Entities$ and $Level2Entities$"