Skip to content

This repo is designed to demonstrate how SonarQube calculates our Test Coverage % metric.

Notifications You must be signed in to change notification settings

SonarSource-Demos/junit-test-coverage-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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 %

About

This repo is designed to demonstrate how SonarQube calculates our Test Coverage % metric.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages