Viewing and analyzing coverage data for lines and methods
View and analyze line and method coverage data in the Coverage Statistics, Coverage Navigator, and Annotated Source views.
Prerequisite: Collecting 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 automatically merged data. If necessary, use the Profiling Monitor toolbar drop-down menu to display resources at the correct level.
- Right-click the profiling resource, then in the pop-up menu select 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.
- Right-click the profiling resource, then in the pop-up menu select Open With > Coverage Statistics.
- 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 (
The following tasks provide additional information about viewing and analyzing coverage data:
Managing data in the Coverage Statistics view
The Coverage Statistics view allows you to filter and rearrange the data to suit your requirements.Controlling the Coverage Navigator display
The Coverage Navigator view allows you to control how data is arranged and displayed.Switching between source data and source code in the Annotated Source view
You can switch between the source data display and the source code display in the Annotated Source view. Source data is coverage pie charts and tables, and source code is a copy of your code marked with coverage annotation.Changing fonts, colors, and font attributes in the Annotated Source view
You can customize the display in the Annotated Source window using the Preferences pages.Opening source code for editing
You can open your source code, if available, for editing from within the Coverage Statistics and Coverage Navigator views. Source code is available for editing only if you are profiling a Java project that is currently open in the Java perspective.
Parent topic
Monitoring code coverage to detect untested lines and methods
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