Monitoring code coverage to detect untested lines and methods

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:

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:

Related concepts
Code coverage monitoring: User interface reference
Related tasks
Getting started: Creating a profiling configuration for runtime problem determination
Related information
Getting started: Profiling J2EE applications
Getting started: Code coverage monitoring
Feedback
(C) Copyright IBM Corporation 2000, 2005. All Rights Reserved.