My apologies, that was a copy and paste error into my original post. Here is how I am setting the path manually property "sonar.coverage.jacoco.xmlReportPaths","build/reports/jacoco/allDebugCoverage/allDebugCoverage.xml"
This is set in my sonar.gradle file. Which I have added below. If there is any other information I can provide, can you please let me know. Thank you again for coming back to me.
No coverage report can be found with sonar.coverage.jacoco.xmlReportPaths='build/reports/jacoco/allDebugCoverage/allDebugCoverage.xml'. Using default locations: target/site/jacoco/jacoco.xml,target/site/jacoco-it/jacoco.xml,build/reports/jacoco/test/jacocoTestReport.xml
I had copied the first line of the log and in error included the full stop. So the copy and paste error was me copying from the logs and including . in error.
This log is indeed aligned and up to date with the path initialised in the sonar config I’ve shared
I have also removed the implicit declaration of the path as suggested in a different post in this community to see would sonar pickup the report automatically but that hasn’t worked either unfortunately.
I removed all exclusions from sonar.exclusions in case some configuration was omitting the xml file but that hasn’t given any success either. I would really appreciate some guidance on this.
I imagine it is something small and trivial causing this issue but I cannot resolve it.
Thank you Colin for coming back to me. I’ve tried that and I get the same issue
No coverage report can be found with sonar.coverage.jacoco.xmlReportPaths='**/jacoco/allDebugCoverage/allDebugCoverage.xml'. Using default locations: target/site/jacoco/jacoco.xml,target/site/jacoco-it/jacoco.xml,build/reports/jacoco/test/jacocoTestReport.xml
No report imported, no coverage information will be imported by JaCoCo XML Report Importer
I’ve compared the jacoco html report to the xml and they match up i.e. branches covered/missed, lines covered/missed etc so I know the xml is valid format
Let me do what I should have done in the first place and clone the playground from the blog post you linked (and install the Android SDK ). I’ll come back on this thread if I can (or can’t) reproduce it.
Great news!! This works for me! Did you notice, Is the coverage imported equal to the html file output? So for example, the html file reads 28% coverage, however, the coverage imported to sonarcloud is only 16.8%
Thank you for that. I may be veering off topic here but looking at my coverage on sonarcloud, it doesn’t recognise the separate module covered in the coverage. It’s not listed when I dig into the coverage on sonar cloud. It is listed under the xml, can you advise it if should be noted in sonar cloud?
There are three packages from the module that are included in the xml report file but aren’t listed in the coverage