Next-Gen App & Browser Testing Cloud
Trusted by 2 Mn+ QAs & Devs to accelerate their release cycles

Quarantining moves an unreliable test out of the blocking lane without deleting it. Here is when that is the right call, how to avoid quarantining a real bug, what it costs you in coverage, and how a test earns its way back.

Harshit Paul
Author

Sandeep Yadav
Reviewer
Last Updated on: August 26, 2026
One test fails roughly one run in twenty. Nobody can reproduce it locally, everyone knows which test it is, and the standing advice is to hit rerun. That test is not protecting anything any more, and it is costing every engineer who waits on the pipeline.
The options are usually framed as fix it, delete it, or live with it. Quarantine is the fourth, and it exists because the first is slow, the second destroys coverage, and the third erodes trust in every other test in the suite.
TL;DR
A quarantined test is one that has been moved out of the set of checks required to merge, while continuing to execute and report on every run. It still tells you what it finds. It just cannot stop anyone shipping while it does.
The distinction that matters is between a test's result and a test's authority. Quarantine changes only the authority. Everything else about the test, including its assertions and its schedule, stays where it was, which is why quarantine preserves the option to bring it back.
The reason this is worth a formal process rather than an ad-hoc decision is how much CI noise turns out to be non-deterministic. In a study of flaky builds in GitHub Actions across 1,960 open-source Java projects, Ge and Zhang report that 3.2% of builds are rerun, that 67.73% of those rerun builds exhibit flaky behavior, and that this affects 1,055, or 51.28%, of the projects studied. Roughly half the projects examined had the problem quarantine exists to manage.
All four remove the red from your pipeline. They differ in what they leave behind, and only one of them leaves you able to make a decision later.
| Action | Does it run? | Does it gate? | What you keep | Main risk |
|---|---|---|---|---|
| Quarantine | Yes | No | The test, its assertions, and a stream of results to judge it by. | Becomes permanent if no owner or deadline is attached. |
| Skip or mute | No | No | The code only. No results, so no evidence either way. | Invisible. Nothing ever prompts a review. |
| Delete | No | No | Nothing. The coverage is gone. | Irreversible, and usually done in frustration rather than analysis. |
| Retry until green | Yes, repeatedly | Yes, eventually passes | A green build and no record of the instability. | A genuine intermittent defect passes as a flake. |
Retry deserves the sharpest warning of the four, because it is the default in most pipelines and it looks harmless. A retry policy converts every intermittent failure into a pass, including the ones caused by a real race condition in the product. Quarantine at least records that the test is untrustworthy; a retry records nothing at all.
Write the entry criteria down before the first argument about a specific test, because in the moment the pressure is always to unblock the release rather than to be rigorous. A workable rule has four parts.
Thresholds circulate as folklore, usually some variant of a failure rate over a fortnight. Pick numbers that match your own run frequency rather than copying them: a suite running 200 times a day and one running twice a week need very different windows to observe the same number of failures. What matters is that the threshold is written down and applied consistently.
This is the question the whole practice turns on. Quarantining a flaky test buys time; quarantining a real defect ships the bug and silences the alarm that would have caught it.
The discriminator is straightforward and frequently got wrong. Rerun against the same commit, not against the latest branch. If the code is identical between attempts and the outcome differs, the test is non-deterministic. If the outcome is stable on that commit and only differs from an older one, something changed and the test is doing its job.
# Wrong: the branch moved between attempts, so a pass proves nothing
git checkout feature-branch && npm test -- --grep "checkout total"
# Right: pin the exact commit that failed, then repeat on identical code
git checkout 9f2c1ab
for i in $(seq 1 15); do
npm test -- --grep "checkout total" >> rerun.log 2>&1
echo "run $i exit=$?" >> rerun.log
done
grep -c "exit=0" rerun.log # mixed results here means non-deterministicRoot-cause categories are worth knowing before you start, because they narrow where to look during the confirmation step.
An empirical study of flaky tests in SAP HANA by Berndt, Bach, and Baltes analyzed 559 fixed-flakiness issue reports and found concurrency the most common category at 23%, or 130 of 559 reports. The same work reports that different test types face different flakiness challenges.
Read a category distribution from someone else's codebase as a starting hypothesis rather than a conclusion about yours. It tells you where to look first, not what you will find.
Enough to be mistaken for flakiness, which is a good reason to measure your own baseline before quarantining anything on a timeout.
Method. We ran one check twenty times in a row on TestMu AI Browser Cloud: open a page on the Selenium Playground in a fresh Chrome session and wait for a named button to attach. Same target, same assertion, same machine, executed sequentially. The test is not flaky and never failed.
20 runs, same check, same target
passed 20 / 20 (0% failure rate)
fastest 12,890 ms
slowest 19,835 ms
mean 15,627 ms
median 15,210 ms
std dev 2,017 ms
spread 1.54x (slowest / fastest)A test that passed every single time still varied by nearly seven seconds between its fastest and slowest run. None of that variance came from the test or the application. It came from session startup, network, and scheduling.
The consequence for quarantine decisions is direct. Apply a timeout to this distribution and a perfectly healthy test acquires a failure rate out of nothing:
| Timeout set at | Runs that would fail | Apparent flake rate |
|---|---|---|
| 16 s (just above the mean) | 7 of 20 | 35% |
| 18 s | 3 of 20 | 15% |
| 20 s (above the slowest run) | 0 of 20 | 0% |
In this TestMu AI Browser Cloud run, a timeout one second above the mean turns a test with a genuine 0% failure rate into one that fails roughly a third of the time. A team watching that test would reasonably call it flaky and quarantine it, and the test would never have been the problem.
Two things follow. Set waits from the observed tail rather than the average, because the average is the one value guaranteed to fail about half the time. And before quarantining on timeout failures, measure the check's own distribution first: if the spread is this wide on a stable test, the flake may be in your threshold rather than in your suite. This is a single check on one account and the absolute numbers will differ on yours, which is exactly why the baseline is worth measuring rather than assuming.
Five steps, and the last one is the step teams omit, which is why quarantine lanes grow.
Step one is where tooling helps most. TestMu AI's Test Insights aggregates execution records across builds and configurations and surfaces consistently-failing tests through failure-frequency analysis, which is a more reliable candidate list than anyone's recollection of last week's reds. Its root-cause analysis correlates network, console, and framework logs to localize a likely cause, and that output is a lead to verify during step two rather than a verdict that settles it.
Two conditions, and the first is not optional. A fix has to be identified and shipped. Absence of recent failures is not evidence of a fix, because an infrequent flake passes long stretches by chance, and that arithmetic is worth being explicit about.
| If the true flake rate is | Chance of 20 clean runs by luck | Chance of 50 clean runs by luck | What that means |
|---|---|---|---|
| 1 in 100 runs | About 82% | About 61% | A clean streak proves almost nothing. Only a fix does. |
| 1 in 20 runs | About 36% | About 8% | 50 runs is meaningful evidence; 20 is a coin toss. |
| 1 in 10 runs | About 12% | Under 1% | A clean streak here is genuinely informative. |
Those figures are the binomial probability of observing no failures in a run of that length at each rate. The practical reading is that the required streak depends on how often the test was failing when it entered, which is precisely why the observed failure rate should be recorded at entry rather than reconstructed later.
Most write-ups on this topic stop at the workflow, which leaves out the part that decides whether the practice is safe. A quarantined test is a coverage gap with a friendly name.
For the duration, the behavior that test asserted is unguarded. A regression in that area will not fail the build, and it will not fail review either, because the reviewer sees green. That is an acceptable trade for a fortnight on a peripheral feature and an unacceptable one indefinitely on a checkout flow.
Two numbers keep this honest, and neither is the count of quarantined tests. Track the age of the oldest entry, which tells you whether the process drains, and the ratio of entries to exits over a quarter, which tells you whether it is a queue or a landfill. A lane of forty tests that turns over monthly is healthier than a lane of five that has not moved since March.
It is also worth naming what quarantine does not fix. The test is still unreliable, the underlying race or timing assumption is still in the code, and the coverage is still absent. Quarantine buys time to do the work; it is not the work. Our guide to flaky tests covers diagnosing the causes, and managing flaky tests in automation covers the surrounding remediation process.
Note: TestMu AI surfaces consistently-failing tests through failure-frequency analysis across builds, so quarantine candidates come from execution history rather than from whoever noticed the last red build. Try TestMu AI free!
The failure modes are predictable enough to design against in advance.
Write the entry and exit criteria before you quarantine the next test, and make both a single page: what qualifies, who owns it, when it expires, and what it has to demonstrate to come back. Teams that skip this step do not avoid quarantine, they just do it informally and permanently.
The one rule worth carrying out of this: confirm non-determinism on a pinned commit before moving anything. Every other mistake here is recoverable, and quarantining a real regression is the one that ships a bug while removing the thing that would have caught it.
To build the candidate list from evidence rather than recollection, the getting started with HyperExecute documentation covers running a suite with per-test reporting and retries configured explicitly, so the failure history you quarantine from is complete.
Author
Harshit Paul is Director of Product Marketing at TestMu AI (formerly LambdaTest), with over 8 years of experience in product and growth marketing for developer and QA tools, leading the Agentic AI in Quality Engineering space. He has authored 80+ technical articles for TestMu AI on software testing and automation, and hosted webinars on Selenium, automation testing, browser compatibility, DevOps, and continuous testing. He has led go-to-market and technical marketing initiatives across software testing products, contributing to SEO, content strategy, and developer marketing. He began his career as a certified Salesforce developer at Wipro Technologies, where he worked for 2 years before moving into marketing. Harshit holds a degree in computer programming from Vivekananda Institute of Professional Studies.
Reviewer
Sandeep Yadav is a Senior Software Engineer at TestMu AI (formerly LambdaTest), where he builds the platform's test intelligence and AI-native engineering systems. He has architected autonomous GitHub Apps, vector-search code intelligence, and self-diagnosing QA workflows, and designed distributed platforms that process 2M+ daily test executions and 1B+ events, turning high-volume test, log, and code data into intelligent, self-optimizing systems. He works on embedding reasoning models into production infrastructure to power autonomous review, root-cause analysis, and analytics workflows. He brings over four years of engineering experience with deep expertise in the Elastic Stack, Apache Kafka, and Redis. Earlier he engineered a GDPR-compliant, end-to-end-encrypted secure web-chat application at Mithi. A Facebook Hackercup 2021 Round 2 qualifier and merit-scholarship recipient, Sandeep holds a B.Tech in Electrical Engineering from Delhi Technological University.
Did you find this page helpful?
More Related Blogs
TestMu AI forEnterprise
Get access to solutions built on Enterprise
grade security, privacy, & compliance