Getting Started with Cover Reports
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 DCover CLI, you can start a free trial.
- Java version 8 or later
- DCover CLI (you can start a free trial, and also see the Getting Started information).
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.
We support the most recent versions of:
- Unpackage the Diffblue Cover Reports ZIP file in a suitable location.
- Run the appropriate script for your Operating System:
- macOS and Linux:
- macOS and Linux:
- The Diffblue Cover Reports browser user interface can now be accessed via http://localhost:8080
To start using Diffblue Cover Reports, you need to ask DCover to upload the required reports
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>
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 Diffblue Cover Reports - please see Working with Cover Reports.
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:
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 DCover, highlighted by order of severity:
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.