Viewing code coverage

Prerequisites:

The Code Coverage Statistics view provides information on the usage of packages, classes and methods. Using this view, you can easily identify classes that are fully utilized, and those that are under utilized which in turn allows you to focus development or test efforts on those under utilized classes. The Code Coverage Statistics view also provides an overview of the classes and methods referenced for a particular task. This can be useful in identifying unexpected method calls.

To view code coverage statistics,...

  1. In Profiling and Logging perspective, select either the monitor or the agent in the Profiling Monitor view. 
  2. Right click and select Open With > Coverage Statistics. The Code Coverage Statistics view opens.
  3. In the Code Coversage Statistics view, select a method that you want to examine.
  4. Right click and select Show Method Invocation.  The Method Invocation view opens.
  5. Examine the column % Methods Missed to identify utilization.
  6. Click on the column title to sort the column.
  7. To drill down further to the method or class levels, use the toolbar controls to switch to the class level or the method level statistics.

Related concepts
Code Coverage Statistics view
Overview of the Profiling tool

Related tasks
Profiling an application
Launching or attaching a Java process