You can determine exactly which parts of your code were not exercised
during a profiling run by collecting code coverage data at the line and method
level. You can examine data for a single run of an application, or merged
data for multiple runs of an application, multiple applications, and multiple
hosts.
To collect data, use the Profiling and Logging perspective. Specify the Method
and Line Code Coverage profiling type in your profiling set to
collect coverage data for both lines and methods.
The following views display coverage data for lines and methods:
- The Coverage Details views:
- The Coverage Navigator view, which uses bar graphs
to indicate coverage levels for packages, classes, and methods.
- The Annotated Source view, which includes the following
displays:
- Source code with annotation: For classes and methods for which source
code is available, this display shows a copy of your code that is marked to
show tested, untested, and partially tested lines.
- Source data: At the class and method level, this display shows pie charts
showing line-level coverage statistics, as well as tables showing the coverage
for each line. At the package level and above, this display shows coverage
summaries.
- The Coverage Statistics view, which shows statistical
data in tabular format.
Data from multiple runs, multiple applications, and multiple
hosts is not only preserved in separate files, but is also merged into cumulative
coverage data sets. Data from multiple runs is merged automatically into a
cumulative coverage data set at the level of host and above.
Note: A Method Code Coverage profiling type is also available, but it does
not collect data that can be displayed in the Coverage Navigator or the Annotated
Source views.
The following topics provide specific instructions: