SonarQube runs unit tests but reports 0.0% code coverage

(Dean Schulze) #1

Must-share information (formatted with Markdown):

  • SonarQube 6.7.6
  • Code coverage by unit tests
  • mvn sonar:sonar -Dsonar.host.url=http://localhost:9000 -Dsonar.login=…

Sonar shows that my unit tests ran but I get 0.0% code coverage. Is there something more that I need to do to get unit test coverage with Sonar?

(G Ann Campbell) #2

Hi,

Take a look here: https://docs.sonarqube.org/display/PLUG/Usage+of+JaCoCo+with+SonarJava

 
Ann