Please enable JavaScript to view this site.

Coverage Validator Help

The Files and lines view displays coverage data for files and their lines.

 

interactiveRead on, or click a part of the image below to jump straight to the help for that area.

 

tab-files-lines-view

 

 

The Files and Lines view is structured as a hierarchy of filenames and the hooked lines within those files.

 

As with many of the tab views, the display is split into two resizable panes.

 

the left side lists a summary of the file and line coverage data
 

the right side shows source code for any file or line selected on the left

 

We'll cover the file and line list and its popup menu first, and then the source code view.

 

 

The file and line list
 

tab-files-lines-header

 

Each line in the view displays the following:

 

the filename or function line within the file
 

for files, the percentage of hookable lines that have been visited, while line data echos the 'progress bar' of their file

 

for files, the number of hooked lines in the file, (unhooked lines in brackets)
 

This is not the same as the total number of lines in a file, which may include comments, declarations and white space.

 

Neither is it the same as the number of hookable lines since some lines or functions can be excluded from hooking.
 

The count also includes lines which should have been hooked but failed, for example because the instrumentation level was set low. The unhooked line count is shown in brackets.

 

for files, the number of different lines that have been visited

 

the total visit count for the file or line

 

This may be equal to the number of different lines visited unless you're counting each visit separately:

 

 

Line colours

 

Each line in the list is colour coded to indicate one of the following:

 

the file or line has not been visited at all
 

tab-files-lines-unvisited

 

the file has been visited to some extent (or the line has been visited)
 

tab-files-lines-visited

 

every hookable line in the file has been visited, i.e. 100% file coverage

 

tab-files-lines-all-visited

 

the line in the file could be hooked
 

tab-files-lines-unhooked

 

 

Unhooked lines

 

Depending on what file or DLLs hook filters are set up, not all the hookable lines in a header file may attempt to be hooked.

 

Only those that are actually used (e.g. via macros or inlines) in the program may actually be hooked.

 

note By default, lines that could not be hooked don't stop the coverage from reaching 100%, but you can change this.

 

In this example below, the instrumentation level was set low ('incomplete but faster') to force significant numbers of unhooked lines.

 

tab-dll-unhookable-lines

 

 

Scrollbar visualisations

 

To the right of each pane, beside the vertical scrollbars, you'll see a coloured area which represents the coverage.

 

For the file and line list, the visualisation shows the coverage of each item in the list - reflecting the progress meters in the second column.

 

dlls-view-scrollbar-viz

 

For the source code view, the visualisation shows the coverage of each line in the file

 

coverage-view-scrollbar-viz1

 

These visualisations provide a snapshot view of the whole list of files or the whole source file.

 

Irrespective of how much you can see in the file and line list or in the source code view, you can still get a global overview of the coverage distribution.

 

 

Files and lines options

 

The coverage controls are shown below.

 

tab-files-lines-display-options

 

 

Window orientation

 

The horizontal or vertical orientation of the statistics and source code panes can be toggled with the orientation button.

 

coverageOrientationVert        coverageOrientationHoriz

 

 

Updating the display

 

Refresh instructionStep updates the display - as does the refresh button on the Tools menu and toolbar

 

 

Display settings

 

Highlight unvisited lines instructionStep highlights rows for any lines that have not been visited (on by default)

 

If switched off, unvisited lines appear white - or whatever colour you've set as the unselected colour.

 

tab-coverage-unvisited-file-unhighlighted

 

Show Path instructionStep for filenames, shows the short file name or the longer file path in the File column of the data

 

Show unhooked functions instructionStep display information about lines that could not be hooked (off by default)

 

This means unhookable lines, for example, lines that were too short, rather than lines or functions that are deliberately set not to be hooked.

 

 

Files and lines menu optionsright_mouse_button

 

The following popup menu is available over the data area to add filters, edit code, or expand and collapse the view.

 

tab-branch-coverage-menu

 

right_mouse_buttonMenu options: Instrumentation Filter

 

The instrumentation filter lets you add filters at different levels of granularity:

 

tab-branch-coverage-menu-inst-filter

 

Exclude Filename instructionStep adds a new filter to the Source Files Filter settings, excluding it from the results of subsequent sessions
 

Exclude Directory instructionStep excludes all files in the same directory as the selected file
 

From the sub menu, choose the directory level at which you want to exclude files, right up to the drive specifier if you need to

 

tab-coverage-menu-inst-filter-dir

 

Exclude DLL instructionStep excludes all files belonging to the same executable or DLL as the selected file
 

This adds a filter to the Hooked DLLs settings.

 

 

The other options all add a filter to the Class and function filter settings

 

Filter By Class instructionStep excludes all functions in the selected class
 

Example filter: CTeststakDoc::

 

Filter By Class And Method instructionStep excludes only the selected class functions
 

Example filter: CTeststakDoc::OnNewDocument

 

Filter By Method instructionStep excludes all functions in the selected class
 

Example filter: OnNewDocument

 

 

note Filters become effective at the start of the next session. Adding a filter during a session will show the relevant rows in grey so that you can see which items would be filtered, but the coverage results will continue to be included for the rest of the current session.

 

 

right_mouse_buttonMenu option: editing source code

 

Edit Source Code... instructionStep opens the default or preferred editor to edit the source code

 

 

right_mouse_buttonMenu options: collapse / expand trace

 

Expand or Collapse Entry instructionStep shows and hides the selected section in the view, the same as using the expand-symbol or collapse-symbolbuttons

 

Collapse All instructionStep completely collapses all sections

 

Expand All instructionStep expands all the sections

 

 

The file source code view

 

Clicking on a file in the file and line view shows that file in the source code view on the right, with the selected line highlighted.

 

The source code uses syntax highlighting by default, with the background colour of the line indicating if the line has been visited, is unvisited or could not be hooked.

 

Icons are displayed next to hooked and unhooked lines indicating visit and hook status and visit counts are shown in-line with the code.

 

Hovering over a line for a short period of time shows a tooltip with the number of visits to the line.

 

Contiguous groups of lines can be collapsed and hidden from view.

 

 

Source code file information

 

On the right hand panel, above the source code, you'll find some information about the source file

 

 

tab-directories-file-info

 

The details shown include the following:

 

'quick view' details for visited and unvisited lines, pink for unvisited, light green for partial visited, and dark green for 100% visited
 

tab-directories-file-info-dial           tab-directories-file-info-dial-covered

 

 

the source code filename and the executable or DLL to which it belongs
 

tab-directories-file-info-file-exec

 

the same statistics as seen for the file in the left hand panel
 

tab-directories-file-info-stats

 

 

Browsing visited and unvisited lines

 

When a line has been selected in the files and lines view, the line is marked in the source code.

 

You can then use the following buttons to move to adjacent lines;

 

next-unvisted instructionStep show the previous and next unvisited line of code in the file
 

b_f7 and b_shift + b_f7 also navigate forwards and backwards when the source code has focus.
 

next-visited instructionStep show previous and next visited line of code in the file
 

The arrows are grey when disabled, for example when a filename rather than a line is selected on the left.

 

b_f8 and b_shift + b_f8 also navigate forwards and backwards through the visited lines.
 

 

Line instructionStep step by individual lines of code
 

Group instructionStep step by groups of contiguous visited or unvisited lines

 

 

Keyboard access: Find and Goto

 

When the data view or the source code view has focus, some keyboard access is available to search for filenames, code or to navigate to numbered lines.

 

 

Find text in data view

 

In the data view, b_ctrl + b_f displays a dialog that will allow you to search by full or partial match for text in the filenames in the first column.

 

find-filename-dialog

 

 

Find text in source view

 

In the source code view b_ctrl + b_f lets you search by full or partial match anywhere in the file

 

find-files-lines-source-view-dialog

 

 

Goto line

 

In the source code view, b_ctrl + b_g displays a goto-line dialog

 

goto-line-dialog

 

.