Use the PureCoverage Annotated Source window to view coverage information for each line of code. By default, the window displays the following data for each line:
n Line number
n The number of times the line of code was hit; 0 indicates the line was missed
n Color-coded highlights to indicate hit lines of code (blue), missed lines of code (red), partially hit multi-block lines of code (pink), dead code (black), and summaries (green)
You can do the following operations in the annotated source:
To |
Do this |
Locate a function in the source file |
Select a function from the Functions list. |
Show or hide columns |
Right-click in any column heading and select Show/Hide Columns from the shortcut menu. You can also drag the right border of a column heading completely to the left to hide the column; use the Show/Hide Columns dialog box to redisplay the column or, for the first column, drag the border to the right again. |
Resize columns |
Drag the right border of a column heading to any width or double-click the right border to automatically resize the column to fit the data. You can also right-click in any column heading and select Size All to Fit from the shortcut menu to resize all columns, or Size to Fit to resize the current column. |
Rearrange columns |
Drag a column by its heading to a new position. |
Change colors |
Select the appropriate command from the Colors list. You can change the color of items such as hit and missed lines, multi-block lines, and summaries. |
Find missed sections |
Right-click in the window and select Next Missed Section from the shortcut menu to find the next section of missed lines, or Previous Missed Section to find the previous section of missed lines. |
Display summaries |
Right-click in the window and select Show Function Summaries from the shortcut menu. PureCoverage inserts a function summary preceding each function. |
Display multi-block lines |
Right-click in the window and select Show Multi-block Lines from the shortcut menu. PureCoverage shows the individual coverage for each basic block contained on a line, as they are ordered in a module. |
Notes:
§ If a numeric value is too long to be completely displayed in a column, PureCoverage displays ###. You can resize the columns to fully display the data.
§ If you chose to display multi-block lines, PureCoverage displays a line for each block, identified by a plus sign (+) in the Line Number column.
§ If you chose to display function summaries, and if the source file uses template functions, PureCoverage inserts a function summary for each instantiation. The function summary identifies the function and the number of times it's called.
§ If dead code falls between lines of hit code or lines of missed code, PureCoverage colors the dead code the same color as the hit or missed code, so you can easily see missed sections of code. You can then use the Next Missed Section and Previous Missed Section shortcut commands to stop where it really matters as you step through your code.
§ When you compare runs, by default the Diff Annotated Source window displays the differences (labeled Diff), as well as original data for the two runs (labeled New and Base). Positive values indicate coverage improvements.
§ Annotated source code is available only if debug line information is available and the module that contains the function was monitored at line level.
§ Annotated source showing line-by-line coverage data is not available when you monitor a Visual Basic 6.0 p-code program.
§ You can copy data from the Annotated Source window to the Clipboard to analyze your code along with the coverage information, to send coverage information to other team members, and to save the coverage information for testing metrics.
§ The status bar displays the current line number, the total number of lines in the file, and the current function.
§ Right-click in the Annotated Source window to display a shortcut menu for working with the annotated source code.
(C) Copyright IBM Corporation 1993, 2010.