A pipeline that deploys automatically but tests by hand has only moved the bottleneck. Continuous testing means the right tests run on every change, the results decide what moves forward, and failures reach the person who can fix them. This guide covers what to run at each stage, how to wire it into GitHub Actions, GitLab, Jenkins, Azure DevOps or Tekton, and how to keep it fast enough that people trust it.
Key takeaways
- Continuous testing needs three things: a trigger, a gate that acts on the result, and an owner for failures.
- Run a small smoke suite on every pull request, the regression suite nightly, and the full suite on release candidates.
- Gate only on new failures in critical paths. Broad gates get overridden.
- Treat flaky tests as defects. Fix them or quarantine them.
- Add gates one at a time, starting with a nightly run that blocks nothing.
What continuous testing means in practice
Continuous testing means automated tests run on every change, not on a QA calendar. A suite that runs when someone remembers to click a button is still manual testing, just with extra steps.
It is also different from simply owning a test suite. A suite becomes continuous once it has triggers that start it, gates that act on the result, and someone who owns the failures. Without all three, results pile up in a dashboard nobody opens.
The aim is fast feedback, close to the change that caused the problem. A failure caught on the pull request that introduced it takes minutes to fix. The same failure found a week later in a release candidate takes an afternoon of digging through commits, and that gap is the whole case for shift-left testing.
Shift-left testing means running tests earlier in delivery, where defects are cheapest to fix. AWS’s DevOps guidance makes the same point: automated QA on every build is there to give fast feedback on each change.
Where end-to-end tests fit in the pipeline
Continuous testing covers several layers of tests. Each layer catches a different kind of problem.
| Test layer | What it checks | Typical run time | When it runs |
|---|---|---|---|
| Unit tests | Single functions in isolation | Seconds | Every commit |
| API and integration tests | Services and components working together | Seconds to minutes | Every pull request or staging deploy |
| End-to-end (E2E) tests | Real user journeys in a real browser or device | Minutes | Smoke on pull requests, full suite on releases |
Unit and API tests usually live in the codebase and run with the build. End-to-end tests are the slowest to run and the hardest to maintain, so they are often the layer that stays manual. The rest of this guide focuses on that layer: getting browser and mobile tests to run, gate and report inside CI.
Which tests run at which stage
Not every test belongs on every change. A workable split looks like this:
- Pull request: a small, stable suite of smoke tests. A failing critical path blocks the merge. Other failures report without blocking.
- Staging deploy and nightly: the regression suite. Failures are triaged the next morning.
- Release candidate: the full suite, including the full browser matrix. The release waits for a green pass or for failures the team understands.
Browsers follow the same logic. Run your top browser on each pull request, and Chrome, Edge, Firefox and Safari on each release, which is where cross-browser testing earns its time. Mobile follows it too: change-scoped runs on each pull request, a critical-path suite that gates the merge, and full regression on release builds.
Agentic coding is multiplying pull requests, which makes this split matter more. We explain why in Stop running integration tests on every PR.
The suite grows as a change gets closer to release, and so does what it can block.
Wiring the suite into your pipeline
The examples below use Klarent’s CI integrations, but most testing tools plug in the same way: a credential in your secret store, a suite ID, and a few run options.
Each run authenticates with a service account key, stored in your CI secret store rather than in the pipeline file. From there you can run a single test or a whole collection. CI inputs call a collection a test suite.
The inputs worth knowing:
- Wait timeout: 30 to 900 seconds, with a default of 300.
- Website URL override: point the same tests at a different environment.
- Parameter overrides: pass values as JSON for one run.
- Browser engine: Chromium, Firefox or WebKit.
How the runner plugs in depends on your platform. GitHub Actions uses a marketplace action and GitLab uses a CI/CD component. Jenkins and Azure Pipelines run a Docker image on any agent with Docker, and Tekton runs it as a Task on Kubernetes. In GitHub Actions, running a suite against a preview environment looks like this:
- name: Run Klarent smoke suite uses: foreai-co/cj-action@v1 with: test_suite_id: 'my-smoke-suite-id' service_account_key: ${{ secrets.CRITICAL_JOURNEY_SERVICE_ACCOUNT_KEY }} wait_timeout_seconds: 360 website_url_override: 'https://pr-123.preview.example.com'One gotcha on Azure DevOps: secret variables are not exposed to scripts by default, so they must be mapped into the script’s environment explicitly with an env: block. Microsoft’s Azure Pipelines docs on secret variables cover the setup.
Gating merges and releases correctly
A quality gate is a rule in your pipeline that a change must pass before it moves to the next stage. The run returns a result, and your pipeline decides what that result means. That split is deliberate: the testing tool reports, and your CI platform enforces.
To block a merge, make the Klarent job a required check, through branch protection or the equivalent in your CI platform. Then keep the gate narrow. Define a small critical-path suite as the quality gate, and block on new critical failures, not on known older issues. A gate that fails for reasons everyone already knows about trains people to override it.
Finally, name an owner for red builds. A failure that belongs to everyone gets fixed by no one.
From red build to fix
A failure is only useful if it reaches someone with enough detail to act on it. A few things shorten that path:
- Automatic issues: optionally, a failed run opens a GitHub issue with step traces, error details, test configuration and a screenshot of the last step. GitLab issue creation needs a token.
- Alerts: Slack, Microsoft Teams or email, switched on per suite, with a link to the failed run.
- Run details: the executed steps with screenshots and code, the error message, and Playwright traces with console and network logs.
A failed run shows the step that broke, with its screenshots, code, traces and error message.
If the cause turns out to be a UI change rather than a bug, heal the test from the failed run instead of rewriting it.
Keeping the pipeline fast and trustworthy
Speed and trust are the same problem. A slow pipeline gets skipped, and an unreliable one gets ignored.
Runs execute in parallel with no concurrency cap, each in a fresh, isolated environment. That isolation removes a common source of flaky results: one test’s leftover state breaking the next.
Keep gate suites small enough to finish well inside the 15-minute wait-timeout maximum and your pull-request feedback window. Use selective runs for the area a change touches, and save full runs for releases.
Pricing shapes this too. When every run costs money, teams run fewer tests. We cover that trade-off in AI test automation pricing.
Treat flaky tests as defects. Investigate them or quarantine them, because red builds nobody believes get ignored, and real failures get ignored along with them.
Environments, data and secrets in CI
The same tests can point at a pull-request environment, staging or production by overriding the URL. You can also override parameters for a run without changing the saved values. Secret values can be overridden too, but never revealed.
Secrets are kept per project, so credentials do not cross environments. Environments that are not public can be reached by IP allowlisting, an IPsec VPN or an SSH tunnel, covered in the tunneling options.
Mobile builds in the pipeline
Slow builds and signing and provisioning problems are why mobile often skips pull-request checks. The build step does not have to change: pull the build from your pipeline, upload it, or push it through the API.
From there, mobile pull request testing posts results back to the pull request with video, logs and the failing step. Concurrent pull requests run without test-data or device collisions. Before each App Store and Google Play submission, run a smoke suite as a last check.
Measuring whether it works
Five numbers tell you whether the pipeline is doing its job:
| Metric | What it measures | What to watch for |
|---|---|---|
| Pull-request feedback time | Minutes from push to test result | Should stay at a few minutes |
| Flaky test rate | Share of failures that pass on rerun with no code change | A rising rate means trust is eroding |
| Gate override rate | How often people bypass a red check | A rising rate means the gate is too broad |
| Escaped defects | Production bugs a test should have caught | Points to gaps in the gate suite |
| Change failure rate | Share of deployments that cause a production failure | One of the DORA software delivery metrics |
Take a baseline during step 1 of the rollout below, before any gate is live.
A three-step rollout plan
Turning on every gate at once is the fastest way to lose the team’s trust. Roll it out in order:
- Run the regression suite nightly, with no gate. Learn the failure rate and fix the noise before anything can block.
- Add a pull-request smoke suite that gates merges on critical paths.
- Run the full suite on release candidates, and gate the release on it.
Each step adds a gate only once the suite behind it has earned trust.
Each step builds on the one before. By the time a test can block a release, the team has already seen it run for weeks and knows what its failures mean. That trust is what makes continuous testing stick, far more than any single tool in the CI/CD pipeline.






