Variables
This is a reference for all variables to be used in structured HTML templates or in single-file text templates, filled with content by ctcreport.
Some variables can be used everywhere, others have a specific purpose for HTML or text templates, in a certain page or in one of the loops. This is described in columns Restriction. Single-file text templates do not process data referring to source code below functions.
When used, the variable name must be enclosed in $...$.
| Variables | Explanation | Values / Pattern by Example | Restriction |
|---|---|---|---|
| ProjectName | defined by option -D ProjectName= |
||
| CreationTime | time stamp the HTML report was generated | 2023-04-24 11:39:16 | |
| NumberOfInstrumentedFiles | Number of source files present in input symbol files, either directly instrumented or included. Variants are not counted. | Integer | |
| CtcReportOptions | command-line of ctcreport call | -html S -o MY-REPORT |
|
| Threshold | defined by option -t |
1 - 100 | |
|
Level1Entity, Level2Entity Level1Entities, Level2Entities |
reporting entities chosen by layout with option -html
|
Directory | File | Function Directories | Files | Functions |
overview and detail pages of HTML templates |
| FileName | symbol or data file name (with path) | Symbolfiles and Datafiles loops | |
| InstrumentationTime | timestamp from symbol file | Mon Apr 24 11:36:01 2023 |
Symbolfiles loop |
| TestTime | timestamp from data file | Mon Apr 24 12:09:12 2023 |
Datafiles loop |
| Measure | name of coverage measure for display | Function | Statement | Decision | Condition | MC/DC | MultiCond | CoverageMeasures loop |
| MeasureTechnical | name of coverage measure for technical purpose (e.g. HTML attributes) | function | statement | decision | condition | mcdc | multicondition | CoverageMeasures loop |
| Hits, MissingHits, Checkpoints, TER | coverage figures and ratio | Integers | CoverageMeasures loop |
| RawHits, RawTER | figures without the influence of justifications | Integers | CoverageMeasures loop |
| Qualification | indicates if coverage ratio is above threshold for current entity and measure | above | below | CoverageMeasures loop |
| IsMeasureNotAvailable | indicates if measure is available (due to instrumentation mode) | MeasureNotAvailable | empty | CoverageMeasures loop |
| EntityName | name of current entity (determined from page and loop context) |
|
HTML templates |
| DirectoryName; SourceFileName; FunctionName and FunctionParameters | name of specific entity |
|
text templates, in Directories / SoureFiles / Functions loops |
| RowNumber | represents original order of entities as handed over by ctcreport | Integer. Row numbers start from 1 for nested loops. |
Level1 and Level2 loops of overview and detail pages; Directories, SourceFiles, Functions loops of text templates |
| DrillToDetail | URL for detail page of current entity, if applicable | detail-00012.html |
Level1 and Level2 loops of overview page sibling loops of detail pages |
| DrillToSource | URL for source view page of current entity, if applicable |
|
Level1 and Level2 loops of overview and detail pages |
| NumberOfJustifications | total number of justifications for current entity | Integer | general scope; Level1 and Level2 loops of overview and detail pages (HTML templates) |
| ShortText, NumberOfJustifications | short texts used in justifications / figures how often they are used | 7 LameExcuse | Justifications loop (HTML templates) |
| DetailEntity, DetailEntities | type of entity the detail page is for |
Directory | File | Function Directories | Files | Functions |
detail pages |
| FirstSiblingName,PreviousSiblingName, NextSiblingName, LastSiblingName | used in context of navigation / browsing through same kind of pages (detail pages or source view pages) |
(for |
detail and source view pages |
|
FirstSiblingDrillToDetail, PreviousSiblingDrillToDetail, NextSiblingDrillToDetail, LastSiblingDrillToDetail |
URL to other detail pages for these siblings | detail-00081.html, ... |
detail pages |
|
FirstSiblingDrillToSource, PreviousSiblingDrillToSource, NextSiblingDrillToSource, LastSiblingDrillToSource |
URL to other source view pages for these siblings | source-00001.html, ... |
source view pages |
| MeMarker | used in context of navigation to mark the current entity in a list of all sibling entities | Me | empty | sibling loops of detail and source view pages |
| LocationOfDisplayedCode | full path and name of source file used for report generation | source view pages | |
| GroupingEntity | type of entity "above" source files, used for navigation |
Directory | AllFiles |
source view pages |
| GroupingEntityName | name of grouping entity for current source file |
All Files |
source view pages |
| FunctionName | name of function as recorded by ctc | foo() |
Functions loop |
| FunctionID | provides unique ID inside one HTML page for functions | F5 | Functions loop |
| LineNumber | of source code line | Lines loop | |
| Indent | assisting measure to indent code | Integer 1 per space, 3 per tab |
Lines loop |
| IsExecutable | indication if the code in this line is generally executable | Executable | Empty | BracesOnly | CommentOnly | PreprocessorLine | Inactive | Lines loop |
| IsExecuted | indication if code in this line was or would have been executed (independent from IsExecutable) | Executed | NotExecuted | PartiallyExecuted | empty | Lines loop |
| IsJustified | indication if code in this line was or would have been justified (independent from IsExecutable and from IsExecuted) | Justified | PartiallyJustified | empty | Lines loop |
| CodeSnippet | piece of source code | if |
CodeSnippets loop |
| CodeKind | for syntax highlighting | Plain | Keyword | Comment | PreprocessorDirective | String | JustificationKey | JustificationShortText | JustificationLongText | CodeSnippets loop |
| ProbeDescription | probe type and code fragment recorded by ctc | const-if (3 > 4) |
Probes loop |
| TrueCounter, FalseCounter | counter values, pure hits are collected in TrueCounter | integer | empty | Probes and ConditionDetails loops |
| IsTrueAchieved, IsFalseAchieved | is counter value > 0 (if present)? | Achieved | NotAchieved | empty | Probes and ConditionDetails loops |
| IsTrueJustified, IsFalseJustified | is counter justified? | Justified | empty | Probes loop and ConditionDetails loops |
| TrueJustificationShortText, TrueJustificationLongText / FalseJustificationShortText, FalseJustificationLongText | User-defined justification texts | ERROR_HANDLING: Checked by review, testing is too expensive. | Probes loop |
| TrueJustificationOrigin, FalseJustificationOrigin | Justifications can be defined in source code comments or in justification files. For depending counters, they are derived. | FromComment | FromFile | Derived | empty | Probes loop |
| IsSingle | marks if a probe is the only one on its source code line. Used to collapse these probe descriptions per default. | Single | empty | Probes loop |
| CounterLevel | minimal coverage level for which a counter is relevant | LevelFunction | LevelDecision | LevelDecisionPlus Remark: Further values are used in HTML directly inside detail loops for higher coverage measures |
Probes loop |
| Condition | text of an atomic condition inside a complex decision | x == 2 |
ConditionDetails and MCDCDetails loops |
| TFCombination | textual representation for a true-false combination | (T || _) && (T || _) |
MulticonditionDetails loop |
| TFID | page-unique ID for true-false combination (used for highlighting when hovering over MC/DC pairs) | TF117 | MulticonditionDetails loop |
| TFNumber | consecutive number, starting from 1 for each multicondition | 1, 2, 3, .. | MulticonditionDetails loop |
| TFCounter, IsTFAchieved | counter value for the combination and indication if > 0 | Integer; Achieved | NotAchieved | MulticonditionDetails loop |
| IsTFJustified | is counter justified? | Justified | empty | MulticonditionDetails loop |
| MulticonditionValue | Boolean value of the whole multicondition for this combination | MCCTrue | MCCFalse | MulticonditionDetails loop |
| IsMCDCAchieved | is MC/DC criterium achieved for current condition? | Achieved | NotAchieved | MCDCDetails loop |
| IsMCDCJustified | is MC/DC criterium justified for current condition? | Justified | empty | MCDCDetails loop |
| MCDCMarker | textual mark if MC/DC criterium is achieved | + | - | MCDCDetails loop |
| IsPairAchieved | is MC/DC pair achieved? | PairAchieved | PairNotAchieved | MCDCPairs loop |
| IsPairJustified | is MC/DC pair justified? | Justified | empty | MCDCPairs loop |
| TFNumberOne, TFNumberTwo, TFIDOne, TFIDTwo | references for an MC/DC pair to its two true-false combinations | 2, 7, TF117, TF122 | MCDCPairs loop |