> For the complete documentation index, see [llms.txt](https://cover-docs.diffblue.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://cover-docs.diffblue.com/features/diffblue-sonarqube-plugin.md).

# Diffblue SonarQube Plugin

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-plugin>.
