Knowledge Base > Diffblue Cover Reports 2.0 > 3. Uploading DCover report bundles

Uploading DCover Report Bundles

BETA

Cover Reports requires three files to be uploaded:

  • report.json: Diffblue’s coverage report created automatically by dcover.
  • diffblue-tests-jacoco-report.xml: a JaCoCo coverage report created as part of the project build
  • manual-tests-jacoco-report.xml: a JaCoCo coverage report created as part of the project build

Generate files and upload to Cover Reports

  • Configure project build to generate JaCoCo files
  • Build project
  • Run dcover create specifying the location of the Cover Reports service:
dcover create
--coverage-reports
--report <URL of Reports service>
--project <name of project>
--name <name of report>

For example:

dcover create
--coverage-reports
--report http://cover-reports-service
--project "customer-markets.trading.name.name"
--name "Branch: 1234/feature-TG12345"

The --coverage-reports command generates JaCoCo reports in /.diffblue/reports/. It can be configured using the additional options:

  • --jacoco-command-manual: run the non-Diffblue tests
  • --jacoco-command-diffblue: run the Diffblue tests

Please note that the --coverage-reports command assumes that the Diffblue tests are named following the *DiffblueTests.java pattern. If the filenames for the created tests were changed or if --class-name-template was used, the generated JaCoCo reports will not be accurate. In that case, please generate the coverage reports manually.

For further information on these commands, please see the user manual and Working with Cover Reports.

Upload existing files to Cover Reports

Sometimes it is useful to upload files that have already been generated. This can be done using:

dcover upload <URL of Reports service>
--project <name of project>
--name <name of report>

For example:

dcover upload http://cover-reports-service
--project "customer-markets.trading.name.name"
--name "Branch: 1234/feature-TG12345"

Project and Name

Please choose suitable values for the --project and --name arguments as these are used to structure the uploaded information. It is a good idea to name them with something that best reflects this snapshot of coverage in the project.