# Quality gate

> Quality Gates: What They Are and What to Put in One. Canonical page: <https://zapple.tech/glossary/quality-gate/>

Quality gates are conditions a code change must meet before it moves to the next stage, such as a merge or a release. Passing tests, no new serious findings and an approving review are typical. A gate turns "ready" from an opinion into a rule your pipeline can enforce, and an agreed override stops your team switching it off.

## What goes in a quality gate?

A gate has three parts: a condition, a place where it is enforced and a choice between blocking and warning.

| Condition | Where it is enforced | Block or warn |
|:--|:--|:--|
| Tests pass | The CI job, then a required status check on the branch | Block |
| Review approved | Branch rule or merge request approval in the code host | Block |
| No new serious static analysis findings | A scanner's gate, reported to the CI job | Block on new code, warn on old |
| Performance threshold met | A load test with pass or fail criteria in CI | Warn at first, block once stable |
| Security findings | A scanner in the pipeline | Block on serious findings, warn on the rest |

The block-or-warn column is our judgement from practice, not a tool default.

The term is also a product feature. [SonarQube](https://docs.sonarsource.com/sonarqube-server/quality-standards-administration/managing-quality-gates/introduction-to-quality-gates) has quality gates and describes one as "a set of conditions against which the code is measured during analysis". This page is about the general practice, which works with any tool.

## Which checks should block a merge, and which should only warn?

Block on checks that are fast, reliable and about the change itself. A required test run is the clearest case. The [GitHub documentation](https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/managing-protected-branches/about-protected-branches) says "Required status checks must have a successful, skipped, or neutral status before collaborators can make changes to a protected branch." [GitLab](https://docs.gitlab.com/user/project/merge_requests/approvals/) says merge request approvals "help to ensure that changes are reviewed before they're merged."

Warn on anything slow, noisy or new. SonarQube's page says the gate status "can be used to fail your CI pipeline if the quality gate fails", so blocking is a setting you choose. A performance check is a good example. The [k6 documentation](https://grafana.com/docs/k6/latest/using-k6/thresholds/) defines thresholds as "the pass/fail criteria that you define for your test metrics." Run it as a warning until the numbers are stable, then turn it into a block. To wire checks into the pipeline as required steps, see our [tools integration](/services/tools-integration/) service.

A gate also applies later in delivery. The [GitHub Actions documentation](https://docs.github.com/en/actions/reference/workflows-and-actions/deployments-and-environments) says "Deployment protection rules require specific conditions to pass before a job referencing the environment can proceed."

## What makes teams switch a gate off, and how do you avoid it?

Three causes come up most. These are practitioner judgement, not a measured result.

- **The gate is slow or flaky.** People rerun until it passes, then ask to remove it. Fix or move the check before you make it a blocker.
- **There is no override path.** An urgent fix meets a red gate and someone disables the rule. A named owner who can override, with a written reason, keeps the rule in place.
- **Nobody agreed the threshold.** A number copied from a tool default starts arguments. Agree each threshold with the people it will stop, and write down who may change it.

Review the gate when it blocks. Every override is a sign that a condition is too strict, too late or too noisy. The GitHub page lists "Do not allow bypassing the above settings" as a branch rule, so decide on purpose whether bypass is allowed. For how a gate fits the tester's role, see [will AI replace software testers](/blog/qa-engineers/will-ai-replace-software-testers/). For the CI side, read our comparison of [CI/CD tools for automated tests](/blog/types-of-automation-testing/what-cicd-tools-to-use-for-automated-tests/), the guide to [continuous testing in DevOps](/blog/test-automation-frameworks/how-to-use-continuous-testing-in-devops/) and the [QA automation pipeline](/blog/types-of-automation-testing/guide-to-creating-qa-automation-pipeline/) guide.

## What does Zapple.Tech do about it?

If you are not sure which of your checks should block, start with the evidence. Zapple.Tech starts with a one-week QA audit of one product area. It looks at its tests, pipeline and release process, and ends in a written report on what is at risk and what to fix first, plus a pilot plan you can run with Zapple.Tech or without it. Read more on the [QA audit and assessment](/services/audit-and-assessment/) page.

Tell us about your pipeline in the form below.

## FAQ

### What is a quality gate?

A quality gate is a set of conditions that a change must meet before it moves to the next stage of delivery, such as merging into the main branch or deploying. The conditions can be passing tests, limits on new static analysis findings, a performance threshold or a required review. If a condition fails, the change stops.

### What is the difference between a quality gate and a test?

A test checks one behavior and reports pass or fail. A quality gate combines the results of many checks into one decision about whether a change may proceed. A gate also decides what happens next, for example blocking a merge, which a single test cannot do alone.

### What should a quality gate check?

Start with what is cheap, fast and reliable, which means the test suite, findings in new code and a review approval. Add a performance threshold or security findings once those checks are stable. A check that is slow or often wrong should warn rather than block until it is fixed.

### Who decides whether a quality gate can be overridden?

Agree it before the first failure. Usually an engineering lead or a named release owner can override, with the reason written down. If nobody is allowed to override, people look for ways around the gate instead.

## Sources

- [SonarQube Server documentation, Understanding quality gates (current docs, SonarQube Server 2026.5)](https://docs.sonarsource.com/sonarqube-server/quality-standards-administration/managing-quality-gates/introduction-to-quality-gates)
- [GitHub Docs, About protected branches (current docs)](https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/managing-protected-branches/about-protected-branches)
- [GitLab Docs, Merge request approvals (current docs)](https://docs.gitlab.com/user/project/merge_requests/approvals/)
- [GitHub Docs, Deployments and environments (current docs)](https://docs.github.com/en/actions/reference/workflows-and-actions/deployments-and-environments)
- [Grafana k6 documentation, Thresholds (current docs)](https://grafana.com/docs/k6/latest/using-k6/thresholds/)
