See the Code Coverage by Unit Tests for Java Project tutorial.To display code coverage data:
- Prior to the SonarQube analysis, execute your unit tests and generate the Clover report.
- Import this report while running the SonarQube analysis by setting the
sonar.clover.reportPathproperty to the path to the Clover report. The path may be absolute or relative to the project base directory.
It is no longer possible to let SonarQube drive the execution of unit tests.