Hello Everyone,
We are currently using Sonarqube-6.7.7 and both maven, gradle projects show coverage in SonarQube Project dashboard. we are planning to upgrade to 7.9.3 and did the setup in dev environment. Maven projects show the coverage but gradle projects is showing 0.0% coverage. Builds ran fine but showing 0.0% coverage.
Attached are the build.gradle config, jenkins build log for sonarqube task and folder structure for test reports.
Hi Ann, Thank you for the response.
I see the same message even for successful builds for 6.7.7. version.
we are running the same gradle setup for both 6.7.7. and 7.9.3 versions.
we are using Java 8 for gradle builds.
Coverage is showing on 6.7.7 but not for 7.9.3.
Attached are the coverage reports from both instances and build logs.
I’m seeing a very similar problem; running gradle agaisnt SQ 7.9.x because we’re also stuck to Java 8 for now, and I see the report is being uploaded:
2021-01-29T17:28:13.481+0100 [INFO] [org.sonarqube.gradle.SonarQubeTask] Sensor JaCoCo XML Report Importer [jacoco]
2021-01-29T17:28:13.484+0100 [INFO] [org.sonarqube.gradle.SonarQubeTask] Importing 1 report(s). Turn your logs in debug mode in order to see the exhaustive list.
2021-01-29T17:28:13.485+0100 [DEBUG] [org.sonarqube.gradle.SonarQubeTask] Reading report '/home/<...>/Workspace/cbc/build/reports/jacoco/test/jacocoTestReport.xml'
2021-01-29T17:28:13.503+0100 [INFO] [org.sonarqube.gradle.SonarQubeTask] Sensor JaCoCo XML Report Importer [jacoco] (done) | time=21ms
I can check the report and it is correct and contains the info that one would expect. But the sonarqube dashboard contains nothing and claims there is 0% coverage.
Annoying. Kind of defeats the purpose of the product when a significant aspect of its functionality is not working as it should.
I’m also seeing an amount of technical debt being picked up by detekt in the gradle console but nothing visible in the sonar dashboard - seems pretty weird.