This repo is designed to demonstrate how SonarQube calculates our Test Coverage % metric.
SonarQube uses lines of code covered AND logical branches covered in our final percentage.
To view jacoco unit test coverage:
- Run the command
mvn test
- Open the file at
./target/site/jacoco/sonarsource.sonarsource_demos/index.html
- Navigate to the file
CoverageMetrics.java
- Compare the Jacoco Test Coverage % to the SonarQube Test Coverage %