Generating and working with code coverage reports
You can generate code coverage reports from cached launches
of a Java™ or plug-in project.
About this task
The Report tab provides rich grouping, sorting, and integration with the Java editor. You can group Java elements by package or type. To generate a code coverage report for a selected coverage launch:
Procedure
- Open the Code Coverage Report dialog box by clicking .
- Select one or more coverage launch configurations, the type of report, and the storage location if you want to save the code coverage report. (By default, you can view HTML-based reports using the internal browser. To view HTML-based reports using an external browser, you must specify a storage location on your file system. The report file will be called index.html.
- Click Run.
What to do next
To manage report data in Eclipse-based reports:
- To manage report data, click the Report tab. Sort columns to help
you quickly identify unacceptable levels of coverage.
- The generated report has the package icon in focus
. If you need another view of the data:
- Click the group by class icon
.
- Collapse all of the tree
.
- Click the group by class icon
- To sort columns in ascending order, click the header, and click again for descending order.
- To open the source in the Java editor, double-click a row containing a compilation unit (such as a class or method), or right-click the compilation unit and click Open in Java Editor.
- To find a compilation unit in the Package Explorer, right-click the compilation unit and select Show in Package Explorer.
- To see a brief summary for the project, click the Summary tab of the report.
To manage report data in HTML-based reports:
- Sort columns to help you quickly identify unacceptable levels
of coverage.
- To sort the Packages, Covered Lines, Total Lines or %Coverage columns in ascending order, click the header, and click again for descending order.