Generating customized code coverage reports

Running code coverage on your compiled language application automatically launches the collection of code coverage data within the Debug perspective. Once completed, the code coverage report opens in the current perspective. If you then switch perspectives, the code coverage report remains viewable from that perspective as well. The Compiled Code Coverage Launch History view also automatically opens in the current perspective once the code coverage report is generated. Additionally, it can be opened from any perspective by navigating to Window > Show View > Other.... Then select Code Coverage > Compiled Code Coverage Launch History.

About this task

This section of the documentation explains how you can:
  • Generate a code coverage report for a previous launch
  • Specify the report format (Workbench or HTML)
  • Save the code coverage results to your file system
  • Generate a code coverage report comparing two previous launches

Procedure

Choosing the report format

About this task

Code coverage results can be reported in a Workbench or an HTML report.

Procedure

Comparing two code coverage runs

Use the code coverage comparison report to view differences in code coverage between two launches.

About this task

Run a code coverage comparison report using either comparison report or compare coverage.

Procedure

  1. Using the comparison report selection:
    1. Right-click any launch from within the Compiled Code Coverage Launch History view and select Generate Report....
    2. In the Code Coverage Report window, select the code coverage launch you want to compare against (hold down the Ctrl key as you click to select the second launch).
    3. Under Report Format and Location, select Comparison Report.
    4. Select either Workbench report or HTML report.
    5. Select View report or View and save report.
    6. Click Run.
      The number in parentheses shows the change in that metric (either in terms of the number of lines covered or the coverage percentage) between the most recent and the previous launch. The delta icon also indicates a change in code coverage. An upward arrow next to the delta icon indicates an improvement in code coverage while a downward arrow indicates that less code was covered in the current launch.
  2. Using compare coverage results:
    Note: This method will only generate a Workbench comparison report.
    1. From the Compiled Code Coverage Launch History view, select the two code coverage launches to compare. hold down the Ctrl key as you click to select the second launch.
    2. Right-click the selection and click Compare coverage results.
      The number in parentheses shows the change in that metric (either in terms of the coverage percentage or the number of lines covered) between the most recent and the previous launch. The delta icon also indicates a change in code coverage. An upward arrow next to the delta icon indicates an improvement in code coverage while a downward arrow indicates that less code was covered in the current launch. Hover the cursor over the delta icon to view the details.

Feedback