# Coverage is not visible for the feature branches

**URL:** <https://community.sonarsource.com/t/coverage-is-not-visible-for-the-feature-branches/70627>\
**Category:** SonarQube Server / Community Build\
**Tags:** quality-gate, sonarqube, coverage\
**Created:** [August 29, 2022, 4:04pm UTC](https://community.sonarsource.com/t/coverage-is-not-visible-for-the-feature-branches/70627 "2022-08-29T16:04:13Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sharanya](https://avatars.discourse-cdn.com/v4/letter/s/e79b87/32.png) [@Sharanya](https://community.sonarsource.com/u/Sharanya)\
**Post date:** [August 29, 2022, 4:04pm UTC](https://community.sonarsource.com/t/coverage-is-not-visible-for-the-feature-branches/70627/1 "2022-08-29T16:04:13Z")

</div>

- 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.

 ![image](https://europe1.discourse-cdn.com/sonarsource/uploads/sonarcommunity/original/3X/c/3/c32e53139ad1bada8e6f99b773d7bd7f118c0e78.png)

 ![image](https://europe1.discourse-cdn.com/sonarsource/uploads/sonarcommunity/original/3X/8/2/823d49296eeee14f31b33b0b852521502ce30a18.png)

---

<div class="post-metadata">

**Author:** ![Colin](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/colin/32/55255_2.png) [@Colin](https://community.sonarsource.com/u/Colin)\
**Post date:** [August 29, 2022, 4:37pm UTC](https://community.sonarsource.com/t/coverage-is-not-visible-for-the-feature-branches/70627/2 "2022-08-29T16:37:56Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Sharanya](https://avatars.discourse-cdn.com/v4/letter/s/e79b87/32.png) [@Sharanya](https://community.sonarsource.com/u/Sharanya)\
**Post date:** [August 29, 2022, 4:41pm UTC](https://community.sonarsource.com/t/coverage-is-not-visible-for-the-feature-branches/70627/3 "2022-08-29T16:41:45Z")

</div>

Hi Colin,

Thanks for your response.

Attaching the screenshot of warnings:

 ![image](https://europe1.discourse-cdn.com/sonarsource/uploads/sonarcommunity/original/3X/b/b/bb482bfc59e612077d650dd003253c6695f0436e.png)

---

<div class="post-metadata">

**Author:** ![Sharanya](https://avatars.discourse-cdn.com/v4/letter/s/e79b87/32.png) [@Sharanya](https://community.sonarsource.com/u/Sharanya)\
**Post date:** [September 1, 2022, 1:23pm UTC](https://community.sonarsource.com/t/coverage-is-not-visible-for-the-feature-branches/70627/4 "2022-09-01T13:23:04Z")

</div>

Hi,

Any update on this?

---

<div class="post-metadata">

**Author:** ![Sharanya](https://avatars.discourse-cdn.com/v4/letter/s/e79b87/32.png) [@Sharanya](https://community.sonarsource.com/u/Sharanya)\
**Post date:** [September 7, 2022, 6:02am UTC](https://community.sonarsource.com/t/coverage-is-not-visible-for-the-feature-branches/70627/5 "2022-09-07T06:02:35Z")

</div>

Any update on this?

---

<div class="post-metadata">

**Author:** ![Colin](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/colin/32/55255_2.png) [@Colin](https://community.sonarsource.com/u/Colin)\
**Post date:** [September 12, 2022, 1:21pm UTC](https://community.sonarsource.com/t/coverage-is-not-visible-for-the-feature-branches/70627/6 "2022-09-12T13:21:11Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![Sharanya](https://avatars.discourse-cdn.com/v4/letter/s/e79b87/32.png) [@Sharanya](https://community.sonarsource.com/u/Sharanya)\
**Post date:** [September 15, 2022, 12:55pm UTC](https://community.sonarsource.com/t/coverage-is-not-visible-for-the-feature-branches/70627/7 "2022-09-15T12:55:27Z")

</div>

Hi Colin,

Thanks for your response.

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

 ![image](https://europe1.discourse-cdn.com/sonarsource/uploads/sonarcommunity/original/3X/5/d/5d4acde9a0e517523b58fe471163a2973379ee08.png)

---

<div class="post-metadata">

**Author:** ![Colin](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/colin/32/55255_2.png) [@Colin](https://community.sonarsource.com/u/Colin)\
**Post date:** [September 15, 2022, 1:22pm UTC](https://community.sonarsource.com/t/coverage-is-not-visible-for-the-feature-branches/70627/8 "2022-09-15T13:22:16Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![Sharanya](https://avatars.discourse-cdn.com/v4/letter/s/e79b87/32.png) [@Sharanya](https://community.sonarsource.com/u/Sharanya)\
**Post date:** [September 20, 2022, 1:57pm UTC](https://community.sonarsource.com/t/coverage-is-not-visible-for-the-feature-branches/70627/9 "2022-09-20T13:57:53Z")

</div>

Hi Collin,

Sorry for the delay in responding.  
I’m not finding that PR here in this dropdown now:  
 ![image](https://europe1.discourse-cdn.com/sonarsource/uploads/sonarcommunity/original/3X/c/6/c6fbda452882af55947b5027c7666827bd22fcc8.png)  
Note: We have observed PRs not displaying any coverage in other PRs also.
