# Is it normal SonarCloud Quality Gate gets passed even with failed unit tests?

**URL:** <https://community.sonarsource.com/t/is-it-normal-sonarcloud-quality-gate-gets-passed-even-with-failed-unit-tests/27267>\
**Category:** SonarQube Cloud\
**Created:** [June 29, 2020, 6:42pm UTC](https://community.sonarsource.com/t/is-it-normal-sonarcloud-quality-gate-gets-passed-even-with-failed-unit-tests/27267 "2020-06-29T18:42:46Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![rafael-trevisan](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/rafael-trevisan/32/12788_2.png) [@rafael-trevisan](https://community.sonarsource.com/u/rafael-trevisan)\
**Post date:** [June 29, 2020, 6:42pm UTC](https://community.sonarsource.com/t/is-it-normal-sonarcloud-quality-gate-gets-passed-even-with-failed-unit-tests/27267/1 "2020-06-29T18:42:46Z")

</div>

Hi there,

I am trying SonarCloud here and I am but confused about the Quality Gate.

It shows green “Passed” even though some unit tests have been failed and others had errors.

I try to see if there is any “settings” but I can’t find anywhere to confirm/change the Quality Gate parameters.

---

<div class="post-metadata">

**Author:** ![mickaelcaro](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/mickaelcaro/32/4147_2.png) [@mickaelcaro](https://community.sonarsource.com/u/mickaelcaro)\
**Post date:** [June 30, 2020, 5:49am UTC](https://community.sonarsource.com/t/is-it-normal-sonarcloud-quality-gate-gets-passed-even-with-failed-unit-tests/27267/2 "2020-06-30T05:49:33Z")

</div>

Hi @rafael-trevisan

Yes, Quality Gate is not meant to be based on the unit tests results (we assume that you will break a build anyhow before actually doing a SonarCloud analysis on that code). This can be based on the code coverage however.

Please see our doc for more information :

- [Quality Gate](https://sonarcloud.io/documentation/user-guide/quality-gates/)
- [Quality Profile](https://sonarcloud.io/documentation/user-guide/quality-profiles/)

HTH,  
Mickaël

---

<div class="post-metadata">

**Author:** ![rafael-trevisan](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/rafael-trevisan/32/12788_2.png) [@rafael-trevisan](https://community.sonarsource.com/u/rafael-trevisan)\
**Post date:** [June 30, 2020, 6:15am UTC](https://community.sonarsource.com/t/is-it-normal-sonarcloud-quality-gate-gets-passed-even-with-failed-unit-tests/27267/3 "2020-06-30T06:15:53Z")

</div>

Got it.

Great thank

---

<div class="post-metadata">

**Author:** ![system](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/system/32/31083_2.png) [@system](https://community.sonarsource.com/u/system)\
**Post date:** [July 7, 2020, 6:15am UTC](https://community.sonarsource.com/t/is-it-normal-sonarcloud-quality-gate-gets-passed-even-with-failed-unit-tests/27267/4 "2020-07-07T06:15:53Z")

</div>

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.
