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 Result 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 Results.

About this task

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

Procedure

Choosing the report format

About this task

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

Procedure

Comparing two code coverage runs

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

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 result from within the Compiled Code Coverage Results view and select Generate Report....
    2. In the Code Coverage Report window, select the code coverage result you want to compare against (hold down the Ctrl key as you click to select the second result).
    3. Under Report Format and Location, select Comparison Report.
    4. Select either Workbench report, HTML report or PDF 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 result. 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 result.
      Note: You will only be allowed to compare two reports if they use the same level of coverage.
  2. Using compare coverage results:
    Note: This method will only generate a Workbench comparison report.
    1. From the Compiled Code Coverage Results view, select the two code coverage results to compare. hold down the Ctrl key as you click to select the second result.
    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 result. 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 result. Hover the cursor over the delta icon to view the details.

Feedback