Hi, I have several java projects (but not all) which stopped showing the code coverage metric sometime during the past 3 weeks, even without any code change… For example, I chose a repository with little changes over the past month, which previously had shown coverage but not anymore.
I’ve checkout and re-ran tests for last month’s commit which was already sent to SonarCloud:
Back then it had coverage:
I have verified the build is ok and tests were actually run:
I’ve also verified that a fresh jacoco report is created
I ran the (freshly downloaded) scanner and did not notice anything wrong:
sonar-scanner -Dsonar.login=XXX -Dsonar.host.url=https://sonarcloud.io -Dsonar.organization=XXX -Dsonar.projectKey=XXX -Dsonar.sources=./app -Dsonar.java.binaries=./target/scala-2.12/classes,./target/web/classes -Dsonar.jacoco.reportPaths=jacoco-merged/merged.exec -Dsonar.branch.name=FEB-11
The scanner output seems ok:
But nothing shows in the freshly created branch in SonarCloud:
Although the background task finished successfully:
Context looks fine (and without any changes over the past 6 months…):
So, same code (and same test results) - but no coverage despite the fact it used to report it. I see similar issues in 3 other java projects as well (although there are other ones that report fine the coverage metric), can anyone please take a closer look?