Diffblue SonarQube Plugin

The Diffblue SonarQube Plugin provides a way to visualize the coverage provided by Diffblue Cover’s AI‑generated unit tests inside SonarQube.

The plugin provides the following metrics about Diffblue’s test coverage:

  • Coverable Lines: the total number of lines that could be covered by unit tests, according to JaCoCo

  • Lines Covered by Diffblue (total): the total number of lines covered by Diffblue tests

  • Lines Covered by Diffblue (exclusively): the total number of lines covered only by Diffblue tests

  • Coverage from Diffblue (total): the percentage of coverable lines covered by Diffblue tests

  • Coverage from Diffblue (exclusively): the percentage of coverable lines covered only by Diffblue tests

How it Works

The Diffblue SonarQube Plugin processes the outputs from Diffblue Cover’s dcover coverage-reports command (.diffblue/reports/diffblue-tests-jacoco-report.xml and .diffblue/reports/manual-tests-jacoco-report.xml for each module Cover has run on). It calculates and stores metrics for each Java source file that is analyzed by SonarQube. Then, it aggregates and stores the metrics at the package, module, and project level. After analysis completes, the metrics are shown on SonarQube's Measures tab in the Diffblue section.

The Diffblue SonarQube Plugin is open source and licensed under Apache License 2.0: https://github.com/diffblue/diffblue-sonar-pluginarrow-up-right.

Last updated

Was this helpful?