SQ: Switched from Community edition to Enterprise edition - the coverage results arent same

Must-share information (formatted with Markdown):

SonarQube : * Enterprise Edition* Version 8.4.1 (build 35646),
Scanner: 4.3.0.2102

  • what are you trying to achieve
    Migrated from community edition: 8.1 (31237) to enterprise edition, but the coverage results are not same in community edition the coverage was 83% but the same in enterprise 43%

  • what have you tried so far to achieve this

We have tried updating the jacoco path and verify the sonar scanner output. No much clue we got so far

Hi,

Welcome to the community!

This is about your version upgrade rather than the edition upgrade. By 8.4, JaCoCo .exec reports are no longer supported. You’ll need to make sure you’re generating XML reports and importing them with the correct parameter.

 
HTH,
Ann

1 Like

Thanks for the response, we added below parameters then it worked.

    -Dsonar.tests=src/test/java \
    -Dsonar.dynamicAnalysis=reuseReports \
    -Dsonar.java.libraries=build/libs/*.jar \
    -Dsonar.junit.reportPaths=build/test-results/test/ \
    -Dsonar.jacoco.reportPaths=build/jacoco/*.exec \
    -Dsonar.coverage.jacoco.xmlReportPaths=build/reports/jacoco/test/jacocoTestReport.xml

Hi,

I’m glad you worked through this. So you know, you can drop sonar.dynamicAnalysis. It doesn’t do anything any more.

 
Ann

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