I have a Bitbucket pull request where I am merging from a feature branch to a release branch. The feature branch in Sonar shows coverage. The PR in Sonar shows estimated coverage after merge. The release branch in Sonar that I merged to shows 0 coverage. I was expecting to also see coverage on the release branch from the pull request. Would you please provide some insight.
Hi,
Is there a difference in pipeline configuration between the release branch and feature branches / PRs?
Can you share the analysis log of the release branch?
The analysis / scanner log is what’s output from the analysis command. Hopefully, the log you provide - redacted as necessary - will include that command as well.
This guide will help you find them.
Ann
There is no difference in pipeline. Here is part of the log for the release branch:
10:54:12 10:53:37.762 INFO: Sensor JaCoCo XML Report Importer [jacoco] 10:54:12 10:53:37.764 WARN: No coverage report can be found with sonar.coverage.jacoco.xmlReportPaths=‘./target/site/jacoco/jacoco.xml’. Using default locations: target/site/jacoco/jacoco.xml,target/site/jacoco-it/jacoco.xml,build/reports/jacoco/test/jacocoTestReport.xml 10:54:12 10:53:37.765 INFO: No report imported, no coverage information will be imported by JaCoCo XML Report Importer
When I look at the pull request build the Jacoco report is found. The code is being merged from a feature branch to the release branch via the pull request.
Hi,
The log lines you’ve quoted are pretty clear. Can you confirm a report exists at an expected location?
Ann
I understand they are clear, but it doesn’t make sense. The same code and configuration is being used that was on the feature branch and the pull request for the merge to the release branch.
Hi,
Thx,
Ann