Monitoring code coverage to detect untested lines and methods

You can determine which parts of your code were not exercised during a profiling run by collecting line and method level code coverage data. Data from multiple runs, multiple applications, and multiple hosts is not only preserved in separate files, but is also merged into composite coverage data sets.

To collect data, use the Profiling and Logging perspective. Specify the Method and Line Code Coverage profiling type in your profiling set to collect both line and method coverage data.

The following views are available to display line and method coverage data:

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:

Collecting coverage data for lines and methods
Begin coverage analysis by collecting data for a profiling run.

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.

 

Parent topic

Detecting and analyzing run-time problems

 

Related concepts

Code coverage monitoring user interface reference

 

Related tasks

Getting started: Creating a profiling configuration for run-time problem determination

Related information
Getting started: Profiling J2EE applications
Getting started: Code coverage monitoring