Coverage is not visible for the feature branches

  • SonarQube Developer Edition ,Version 8.9.7 (build 52159)

We are not able to see the coverage for the feature branches even if there is new code:

As shown below, coverage is not visible. On the Sonarqube dashboard(In the screenshot), Quality gate shows passed even though we have set quality gate condition to fail on new code coverage if it’s less than is 80%.
When we try the quality gate api for the same PR shown the screenshot: GET api/qualitygates/project_status (passing the parameter for the pull request ID), the result shows failed. The Sonar dashboard and the api results are not matching.

It looks like your analysis has 4 warnings (right next to the analysis date), if you click on the link, what are they?

Hi Colin,

Thanks for your response.

Attaching the screenshot of warnings:

Hi,

Any update on this?

Any update on this?

It looks like SonarQube isn’t detecting any changed lines that can be covered by code (executable lines). Are the 110 lines changed in this pull request actually covered by tests? What kinds of files are these?

Hi Colin,

Thanks for your response.

Yeah, the lines in that PR are covered by the tests. They are java files.
PFA:

It looks like 109 of those lines are tests themselves (existing in the /test/ directory), so they wouldn’t be able to be covered by tests.

What is the one line that changed in the /main folder?

Hi Collin,

Sorry for the delay in responding.
I’m not finding that PR here in this dropdown now:
image
Note: We have observed PRs not displaying any coverage in other PRs also.