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


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://cover-docs.diffblue.com/features/diffblue-sonarqube-plugin.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
