Please enable JavaScript to view this site.

Thread Validator Help

The Coverage tab lets you find untested parts of your program's thread synchronization code.

 

If the Coverage tab isn't visible, use the Data Views menu to set which views are shown.

 

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

 

coverage-tab

 

 

Using the coverage information

 

Inspecting the coverage tells you which thread synchronization locations are or are not being tested.

 

Understanding the thread coverage helps you plan and improve your regression tests to include areas of code that perform thread synchronization but are not yet being visited.

 

The display shows two resizable panes, one with the coverage data, and the other shows source code when you click on a row in the table.

 

note In order to gather coverage statistics, you'll need to switch on the thread coverage setting, otherwise you'll just see the reminders below:

 

coverage-tab-coverage-not-enabled

 

 

Colours used in the displays

 

Each file's row is coloured according to whether it has:

 

objects-colours-red  no lines visited

objects-colours-yellow  some lines visited

objects-colours-light-blue  all lines visited

objects-colours-light-gray  been filtered out for subsequent sessions (see below)

 

The % Visited column and the source code view uses the following colours:

 

objects-colours-light-green  for the percentage of lines visited, or visited lines of source code

objects-colours-light-blue  for unvisited lines

 

 

Coverage data

 

The data in each column is summarised below

 

File

Num Lines

Num Visited

Visit Count

% Visited

DLL

the statistics are gathered for each source code file found  

number of lines in each file that allocate, reallocate or free memory and handles

the number of those lines that have been visited

total number of visits to those lines

the percentage of relevant lines visited (Num Visited / Num Lines)

the DLL responsible for the file

 

The Visit Count may be equal to the Num Visited if you have opted to keep the default thread coverage setting of counting visits to each allocation only once. You can change this setting on the fly to start counting multiple visits right away.

 

At the top of the table is a Totals line showing combined results for all files.

 

note The statistics here only cover lines that affect thread synchronization, unlike SoftwareVerify's sister tool Coverage ValidatorexternalLink which determines complete code coverage.

 

 

Sorting columns

 

Sorted columns are highlighted yellow in the table header. Click on the header to change the sorting column or its sort direction order.

 

 

Source code view

 

The source code view is syntax-highlighted with green visited and pale red unvisited lines.

 

The columns at the left show line numbers (in black) and visit counts (blue) for each thread synchronization line. Visit counts are also available via a tooltip.

 

coverage-tab-source3

 

 

Coverage options

 

interactiveThe following controls are displayed to the left of the coverage results

 

coverage-tab-options

 

 

Filters

 

Unwanted results in the coverage can be excluded via the filters according to filename, directory or DLL.

 

Filters can be managed in the filters dialog or added via the menu options right_mouse_buttonbelow.

 

Filters... instructionStep shows the Thread Coverage Filters dialog

 

The filters dialog is the same one as found on the thread coverage page of the global settings dialog where it is described in detail.

 

 

Window orientation

 

The data and source code panes can be arranged horizontally or vertically with the orientation button.

 

 coverageOrientationVert        coverageOrientationHoriz

 

 

Updating the display

 

Update Interval (s) instructionStep automatically updates the display at your choice of interval between 0.1 and 60 seconds - or not at all!

 

Adjust this depending on the complexity of your application.

 

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

 

With an update interval set to No Update, you'll need to use this Refresh button to update the display when you wish.

 

 

Display settings

 

On the Coverage tab, there's only the one display option:

 

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

 

 

Coverage view popup menuright_mouse_button

 

The following popup menu is available over the data area to add filters, refresh the view or edit source code.

 

coverage-menu

 

 

right_mouse_buttonMenu options: Filtering coverage

 

The first three menu options let you add filters at different levels of granularity.

 

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

 

Filter coverage data by filename instructionStep adds a new filter to the Filters dialog, excluding the selected file from the results of a subsequent session
 

Filter coverage data by directory instructionStep excludes all files in the same directory as the selected file

 

Filter coverage data by DLL instructionStep excludes all files belonging to the same DLL as the selected file

 

 

right_mouse_buttonMenu option: Refresh

 

Refresh... instructionStep updates the statistics displayed in the table

 

 

right_mouse_buttonMenu option: Editing source code

 

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