Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
cole-gannaway-sonarsource committed Feb 27, 2024
1 parent 0a765b9 commit c28fb41
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion README.md
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 %

0 comments on commit c28fb41

Please sign in to comment.