Gitlab + Sonarqube + jacoco - No coverage found

Must-share information (formatted with Markdown):

  • Version 8.3.1

Trying to get code coverage to show up in sonarqube.
I have set up my gitlab pipeline to run the following:

mvn -Dsonar.qualitygate.wait=true -Dsonar.junit.reportsPaths=${TEST_REPORT_VIDEOCOMMON},${TEST_REPORT_COLLECTION_CONDITION} -Dsonar.coverage.jacoco.xmlReportPaths=${TEST_COVERAGE_VIDEOCOMMON},${TEST_COVERAGE_COLLECTION_CONDITION} verify jacoco:report sonar:sonar

I’ve also tried with mvn verify, mvn clean install (with/without jacoco:report)

The reports are being generated locally in the paths specified. Jacoco is working fine but sonarqube is not finding these reports and is saying I have 0% coverage.

The debug file is quite large. I can send it privately to whoever is looking into this. It will take me some time to ensure no tokens are uploaded by mistake.

I’m sending you a private message so that you can reply with the scanner logs.

JaCoCo plugin was missing in SonarQube

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.