- SonarQube Version - 7.9.6 and SonarScaner Version - 4.6.2.2472
- To display Jacoco Coverage Report on SonarQube UI
- Integrate SonarQube with Jenkins.
ISSUE I have Jenkins pipeline and build process is generating JACOCO code coverage report (
Instructions Cov - 38% and Missed Branches - 26% ). Now I have integrated SonarQube for code analysis with required analysis parameter. Code analysis is displaying with on SonarQube UI but coverage is not displaying correctly. It should display the coverage published by JACOCO report ( eg. 38%).
sonar.projectKey=****
sonar.login=****
sonar.password=****
sonar.sources=.
sonar.java.binaries=**/target/classes
sonar.host.url=****
sonar.java.coveragePlugin=jacoco
sonar.coverage.jacoco.xmlReportPaths=Path of jacoco.xml file
Expectation - Same coverage from Jacoco report (38%) should be displayed.
I also tried to publish same JACOCO report with other Code quality tool and it is displaying same coming from JACOCO.
Could you please suggest what can be the reason for not displaying the same coverage report.
OR there is any calculation happens on JACOCO report before displaying on SonarQube ?
OR there is any other level (like line, branch), which SonarQube displays the code coverage ?
Thanks,
Santosh Kumar