Viewing and analyzing coverage data for lines and methods

You can view and analyze coverage data for lines and methods in the Coverage Statistics, Coverage Navigator, and Annotated Source views.

Prerequisite: Collecting coverage data for lines and methods
To view and analyze coverage data for lines and methods:
  1. Display the three coverage views for your profiling resource. If you have performed multiple profiling runs, select a profiling resource at the level of host or higher to see the data that was automatically merged. If necessary, use the Profiling Monitor toolbar drop-down menu to display resources at the correct level.
    1. Right-click the profiling resource, then click Open With > Coverage Details. This opens both the Annotated Source and Coverage Navigator views. If these views report No data available for display, read Flushing coverage data for display in the Coverage Details views.
    2. Right-click the profiling resource, then click Open With > Coverage Statistics.
  2. Check coverage at the method level by using the Methods columns in the Coverage Statistics view.
  3. Check coverage at the line level by using the Units columns in the Coverage Statistics view and the two-colored bar graphs ( Coverage Navigator coverage indicator ) to the left of each entry in the Coverage Navigator view. Units are executable byte-code commands; a line of code can contain one or more units.
  4. Identify the specific lines or units that you have not exercised in the Annotated Source view by clicking an item in the Coverage Statistics or Coverage Navigator view to display it in the Annotated Source view. Clicking any item in the Coverage Navigator or the Coverage Statistics view synchronizes all three views.
  5. In the Annotated Source view, click Annotated Source toggle button to toggle between the Source Data and Source Code with Annotations displays.
    1. Use the line tables in the Source Data display to identify uncovered lines.
    2. Use the Source Code with Annotations display to see coverage annotations displayed directly on a copy of your code.
You can also do the following:
Related tasks
Collecting coverage data for lines and methods
Related reference
The Coverage Statistics view for line and method coverage data
The Coverage Navigator view
The Annotated Source view, source code with annotations display
The Annotated Source view, source data display
Feedback
(C) Copyright IBM Corporation 2000, 2005. All Rights Reserved.