Template for a good new topic, formatted with Markdown:
- ALM used GitHub
- CI system GitHub Actions*
- Scanner command used when applicable (private details masked) I used the gradle plugin
- Languages of the repository Kotlin
- Only if the SonarCloud project is public, the URL https://sonarcloud.io/project/overview?id=reisi007_reisishot.pictures
- And if you need help with pull request decoration, then the URL to the PR too —
- Error observed (wrap logs/code around with triple quotes ``` for proper formatting): **No coverage information (see more info below)
- Steps to reproduce run the CI / the CI commands manually
- Potential workaround –
So… My problem is the following: I have 0.0% code coverage… I mean, my code coverage is low (<5%) but definitely not 0%.
I use an aggregated report and the generated HTML report states the code coverage as follows:
So I kind of expect my code coverage to be either 2% or 4%
The next question is: Is Sonar using the generated XML?
2022-01-29T09:32:20.432+0100 [INFO] [org.sonarqube.gradle.SonarQubeTask] Sensor JaCoCo XML Report Importer [jacoco] 2022-01-29T09:32:20.433+0100 [INFO] [org.sonarqube.gradle.SonarQubeTask] Importing 1 report(s). Turn your logs in debug mode in order to see the exhaustive list. 2022-01-29T09:32:20.433+0100 [DEBUG] [org.sonarqube.gradle.SonarQubeTask] Reading report 'S:\Reisishot\MiSe\build\reports\jacoco\jacocoAggregatedReport\jacocoAggregatedReport.xml' 2022-01-29T09:32:20.526+0100 [INFO] [org.sonarqube.gradle.SonarQubeTask] Sensor JaCoCo XML Report Importer [jacoco] (done) | time=96ms
Which is the XML version of the HTML report listed above. This seems to happen for every subproject. However, I do not care as I have a three step approach
- Run tests (and generate reports)
- Combine reports
- Run sonar
So in any case the combined report should not change at all during the sonar run…
How do I get the code coverage to be reported correctly…?