CI/CD Pipeline Quality Gates: Build a Pipeline Your Team Trusts

ci cd pipeline

A CI/CD pipeline is only as good as the decisions it supports. How to design stages and quality gates around risk, keep feedback fast, and stop flaky tests from eroding trust.

Key takeaways
The 30-second version of this article
Design every pipeline stage as a decision point: commit (can I merge this?), integration (does it work with its neighbors?), pre-release (can we release this build?) and release (should every user get it now?).
Untrusted tests are the biggest threat to a pipeline. Google reported that about 1.5% of test runs were flaky and about 84% of observed pass-to-fail transitions involved a flaky test.
Quarantine flaky tests with an owner and a deadline, record every retry instead of hiding it, and track the flake rate as a pipeline health metric.
A pipeline runs checks, not the whole of testing: keep exploratory testing close on feature branches, in preview environments and against canary releases.
Measure the pipeline as a system: DORA's five delivery metrics, plus feedback time per stage, flake rate and escaped defects by stage.

Most advice about CI/CD pipelines is about speed: faster builds, more parallel jobs, more deploys per day. Speed matters. But a fast pipeline nobody trusts is just a faster way to ignore failures. When engineers start rerunning a red build "to see if it goes green," the pipeline has stopped informing decisions.

I design pipelines around one idea: every stage is a decision point. Each one answers a question someone needs answered, in time to act on it. Every test that runs should earn its place by improving that answer.

What CI and CD Mean

Martin Fowler defines continuous integration as a practice where each team member merges their changes into a shared codebase at least daily, with each merge verified by an automated build that includes tests. The point is to find integration problems while they're small.

Continuous delivery extends that idea: every change that passes the pipeline is releasable, and releasing is a business decision rather than an engineering project. Continuous deployment goes one step further and releases automatically. The quality question is the same in all three: what evidence does each gate need before a change moves forward?

Design Stages as Decisions

Stage

Decision it supports

Checks that belong here

Feedback target

Commit

Can I merge this?

Unit and component tests, static analysis, build

Minutes

Integration

Does it work with its neighbors?

API and contract tests, integration tests against real dependencies

Under an hour

Pre-release

Can we release this build?

Smoke checks, critical user journeys end to end, key non-functional checks

Before the release window

Release

Should every user get it now?

Canary or staged rollout, production monitoring, rollback triggers

During rollout

The feedback targets matter. Fowler cites the Extreme Programming guideline of a ten-minute build as reasonable for most projects. Past that point, developers context-switch, batch up changes and stop treating the commit stage as their own safety net.

Notice what's missing from the table: exploratory testing, usability judgment and questions nobody has thought to ask yet. A pipeline runs checks: mechanistic verification of things you already know to look for. That's essential, and it isn't the whole of testing. Teams that ship fast keep exploratory testing close to the pipeline: on feature branches, in preview environments and against canary releases. They don't treat a green build as proof of quality.

Signal Over Volume

The biggest threat to a pipeline isn't missing tests. It's untrusted tests.

Google published some of the clearest data on this. In 2016, John Micco reported that about 1.5% of all test runs at Google returned a flaky result. Almost 16% of their tests showed some level of flakiness, and about 84% of observed pass-to-fail transitions involved a flaky test. When most red builds are noise, people learn to ignore red builds, including the ones that matter.

What I recommend:

  • Quarantine flaky tests, with an owner and a deadline. A quarantined test that nobody fixes is a deleted test with extra steps.
  • Don't retry silently. Automatic retries hide the flake rate. If you retry, record it and report it.
  • Track the flake rate as a pipeline health metric. It deserves the same attention as build time.
  • Prefer a smaller suite you trust. Fifty reliable checks on critical paths beat 500 that fail at random.

Let Risk Choose What Runs

Running every test on every commit doesn't scale, and it isn't necessary. Match test depth to change risk. A copy change in a help page and a change to payment calculation shouldn't face the same gate. Use change-impact analysis to pick regression scope, and always run the small set of checks that guard your most critical user journeys.

The same logic applies to failures. Every red result should lead to one of three outcomes: fix the product, fix the test or remove the test. A rerun isn't an outcome.

Measure the Pipeline as a System

DORA's research gives the industry a shared vocabulary for delivery performance. DORA's current guide lists five metrics. Three measure throughput: change lead time, deployment frequency and failed deployment recovery time. Two measure instability: change fail rate and deployment rework rate. Quality engineering affects every one of them.

Alongside DORA, I watch three pipeline-level signals:

  1. Feedback time per stage. Is each gate fast enough to act on?
  2. Flake rate. What share of failures aren't real?
  3. Escaped defects by stage. When something reaches production, which gate should have caught it, and why didn't it?

The third one closes the loop. Every escaped defect is a lesson about where your pipeline's checks don't match your risks.

Where Katalon Fits

Katalon Studio tests run in CI/CD through the Katalon Runtime Engine on the command line, and Katalon TestCloud adds scaled, parallel execution across browsers and devices. Katalon True brings results together for reporting and analysis, which helps when tracking flaky tests and failure trends. Katalon TrueTest uses real-user data to find regression coverage gaps. None of this makes a flaky test reliable, or decides what your gates should guard. That's design work, and it's where your team's judgment matters most.

Frequently asked questions

Mush Honda

Mush is Chief Quality Architect at Katalon, with over 20 years of experience in Quality Engineering and Agile software delivery. In-depth experience of development / delivery methodologies with expertise in all areas of software quality engineering, test automation, DevOps, and test project management.

Connect on LinkedIn →
Get started

Test everything. Ship with confidence.

From generating test cases to spotting failures, Katalon's AI works across your entire pipeline, automatically.

Live webinar

The Next Evolution of Manual Testing: Introducing Katalon AI Test Runner

Learn how to grow your QA team's capacity in the age of AI, then watch Katalon AI Test Runner turn manual test cases into automated runs, live.

2:00 to 3:00 PM IST
Almas AhmedSenior Account Manager
Sumit WankhedeSolutions Engineer Manager
Register now