Getting Started with Cover Reports 1.0

Introduction

Diffblue Cover Reports provides insights about your code to help your team identify gaps in your application’s coverage, to target development work through data visualization using Diffblue Cover CLI and JaCoCo.

These data visualizations help make sure you have coverage where it is most important, instead of relying only on a single percentage for your entire application. In the screenshot below, although the application has a high level of coverage, some classes only have between 0-40% and 40-70% coverage. If these classes are critical for your application it may mean your application remains at high risk despite high coverage.

These reports are free for all customers using the Diffblue Cover CLI. Please contact your account manager to get access to Cover Reports. Or, if you are not yet using Cover CLI, you can start a free trial.

Prerequisites

For complex projects with around 20 connections, we suggest using 16 GB of RAM and 4 cores. Less complex projects with fewer connections will mean a lower minimum requirement. For advice, please contact Diffblue Support.

Supported Browsers

We support the most recent versions of:

  • Chrome
  • Safari
  • Edge
  • Firefox

Installation

  1. Unpackage the Diffblue Cover Reports Zip file in a suitable location.
  2. Run the appropriate script for your Operating System:
    1. macOS and Linux: ./reports-unix.sh
    2. Windows: reports-win.bat
  3. The Diffblue Cover Reports browser user interface can now be accessed via http://localhost:8080

Getting Started

To start using Cover Reports, you need to ask Cover to upload the required reports jacoco.xml and dcover.json. (The dcover.json report contains information about the tests generated for each class and method, along with details of the output codes.)

This is as follows:

dcover upload <URL of reports server>
--project <projectname path>
--name <reportname>

For example:

dcover upload http://reports.internal.customer.com:8080
--project customer-markets.name1.name2.name3
--name “Branch: 0123/feature-TG12345”

If you also want to create your reports (and tests), please use the dcover create --report <url> --coverage-reports command as described in: Working with Cover Reports.

Once you have uploaded your first report, you can see all reports listed by clicking on this icon on the left menu:

Please note that you can also combine writing tests with creating and uploading Cover Reports - please see Working with Cover Reports.

Please ensure you regularly back up the relevant folder(s)

Test Coverage Breakdown

Once you have uploaded a report, click on the Dashboard icon to see the Test Coverage Breakdown. An example is shown below:

Coverage

Click on to see more detailed information on coverage. An example is shown below. The innermost circle represents the package, the middle circle represents the classes, and the outer circle represents the methods.

You can hover over any slice of the sunburst to see the coverage percentage.

Note the key for modules, packages and classes. This enables you to keep track of the visualized methods. The example above is at the module level, and the example below is at the class level:

You can further drill down into the methods if you wish to do so.

You can also scroll down to see the output codes from Cover, highlighted by order of severity:

Insights

Use the icon to see the insights into your report, for example:

You can also:

  • Hover over the Insights column (on the right) to find information on the output codes, as shown below:

  • Click > to see information at the method level, for example:

  • Use the search facility to find the information you are looking for, including the output codes.

For further information, please see Working with Cover Reports.