You can view and analyze coverage data for lines and methods in
the Coverage Statistics, Coverage Navigator,
and Annotated Source views.
To view and analyze coverage data for lines and methods:
- 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.
- Right-click the profiling resource, then click . 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.
- Right-click the profiling resource, then click .
- Check coverage at the method level by using the Methods columns
in the Coverage Statistics view.
- Check coverage at the line level by using the Units columns in
the Coverage Statistics view and the two-colored bar
graphs (
)
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.
- 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.
- In the Annotated Source view, click
to toggle between the Source Data and Source Code with Annotations
displays.- Use the line tables in the Source Data display to identify uncovered
lines.
- 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: