From c28fb41423ec8da488fa601e944f68f840f929ad Mon Sep 17 00:00:00 2001 From: Cole Gannaway <156719330+cole-gannaway-sonarsource@users.noreply.github.com> Date: Tue, 27 Feb 2024 16:52:30 -0600 Subject: [PATCH] Update README.md --- README.md | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index a584762..0b14eac 100644 --- a/README.md +++ b/README.md @@ -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 % \ No newline at end of file