-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
0a765b9
commit c28fb41
Showing
1 changed file
with
10 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,11 @@ | ||
# junit-test-coverage-example | ||
|
||
|
||
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: | ||
1. Run the command `mvn test` | ||
2. Open the file at `./target/site/jacoco/sonarsource.sonarsource_demos/index.html` | ||
3. Navigate to the file `CoverageMetrics.java` | ||
4. Compare the Jacoco Test Coverage % to the SonarQube Test Coverage % |