The Annotated Source view, source data display
The coverage source data display of the Annotated Source window consists of pie charts that show line coverage statistics for classes and methods, and tables that provide coverage data for each line.
To display the Annotated Source view, right-click a profiling resource entry in the Profiling Monitor, then select Open With > Coverage Details. Data for the resource must have been collected with a profiling set that included the Method and Line Code Coverage profiling type.
Note: If you have collected coverage data for multiple profiling runs, the results are merged automatically at the host level and above with data collected. To display the Host profiling resource, open the Profiling Monitor drop-down menu and, if the Hide Host command is preceded by a checkmark, click the command to remove the checkmark. You can now open the coverage views for the host-level profiling resource.
Navigation
Clicking a class or method in the Coverage Navigator view displays the data for the class or method.
Note: Clicking an entry in the Coverage Navigator at the package level or above displays a coverage summary. The coverage summary graph shows the distribution of coverage levels among the files that the entry contains, and a data table listing all the files by coverage rate. Each bar in the graph links to the table; for example, clicking the bar labeled 25% - 50% displays the first line in the table with a coverage rate between 25% and 50%.
Pie charts and tables
There is one pie chart for each class. There is one pie chart and one table for each method:
- The pie chart shows how many lines were tested, untested, and partially tested.
- The table lists each line, with a line number, and indicates whether it was tested, untested, or partially tested. A line is partially tested if it contains multiple units (executable byte code commands) and not all units were exercised.
The tables display the following:
Controls
The following toolbar buttons and menu commands appear in the Annotated Source view:
Toolbar Button Command Description Toggles between Show Source Code with Annotations and Show Source Data
Toggles the Annotated Source view to show either the source code with annotations or the source data.
Open Source for Editing
Displays the source code, if available, for the selected item. Source code is available only if you are profiling a Java project that is currently open in the Java perspective.
Note: If this view reports No data available for display after you have collected line and method coverage data, flush the data manually for subsequent runs.
Parent topic
Code coverage monitoring user interface reference
Related tasks
Collecting coverage data for lines and methods
Viewing and analyzing coverage data for lines and methods
Related reference
The Annotated Source view, source code with annotations display