0

I have upgraded my SonarQube from 3.7 to 5.1 now. Issue is earlier I used to get all the unit test,integration test coverage report all fine on the dashboard. However, post the upgrade from 3.7 to 5.1 I do not get unit test coverage report anymore on the dashboard. I continue to get integration test coverage report like before. The reason to do the upgrade was that we moved from java 7 to java 8 as older version of SonarQube didn't support java 8. Please advise on how to resolve the issue as I have no clue until now.

agabrys
  • 8,728
  • 3
  • 35
  • 73
nishat
  • 947
  • 2
  • 8
  • 15
  • 1
    Please add information how you build project and which tool do you use to generate code coverage. You might be interested in this question: http://stackoverflow.com/questions/31588656/not-getting-the-coverage-on-new-code-in-sonar-dashboard – agabrys Nov 03 '15 at 21:30
  • I have a jenkins job that trigers a maven target sonar:sonar for the sonar build. The pom.xml has jacoco ${project.scm.tag}${project.basedir}/test/resources/jacoco-it.exec org.apache.maven.pluginsmaven-surefire-plugin2.17 – nishat Nov 04 '15 at 12:56

1 Answers1

1

You need to add tool (e.g jacoco) which generates code coverage report. SonarQube only analyse data generated by other tools (e.g. jacoco.exec, *.class etc). Here is the answer: https://stackoverflow.com/a/31590608/4944847

agabrys
  • 8,728
  • 3
  • 35
  • 73