Automated Testing

Test Automation Debt: When Your Test Suite Stops Delivering Value

Reading Time: 13 minutes

Last updated: 9 October 2026

This guide explains how to measure and reduce test automation debt, using suite health metrics with stated formulas, a decision table for fixing, quarantining, refactoring or deleting a test, and a practical approach to flaky tests in CI/CD. It is written for automation QA engineers, QA leads, engineering managers and CTOs whose suite has grown large enough that people have started ignoring it. Figures come from Google’s published flakiness research, CircleCI platform telemetry and the World Quality Report 2025-26.

A test suite does not fail all at once. It degrades. Runs get slower, a few tests start failing at random, somebody adds a retry, and within 2 quarters the team has learned to glance at a red build and merge anyway. At that point the suite still costs money to run and maintain, and it no longer stops anything from shipping.

The pipeline data says this is getting worse. CircleCI’s 2026 State of Software Delivery, based on 28,738,317 workflows run on its platform, found that main branch success rates dropped to 70.8%, the lowest in over 5 years and well below the 90% benchmark CircleCI recommends. Recovery time climbed to 72 minutes for the typical team, up 13% year on year.

This article is a remediation playbook. It does not re-argue the case for automation, and it does not repeat the automation challenges and ROI analysis in our guide to automation challenges and ROI. What follows is operational: what to measure, what the numbers should look like, what to do with each failing test, and when to stop maintaining one. You can see how we run this work on our automated testing services page.

What Is Test Automation Debt

Test automation debt is the accumulated cost of automated tests that no longer return more value than they consume. It behaves like technical debt in application code: every shortcut, unmaintained script and tolerated flaky test adds interest, paid in engineering hours and in slower releases.

Debt accumulates in 4 distinct forms, and they need different treatment.

  • Flakiness debt. Tests that pass and fail without any code change. The cost is investigation time and, eventually, a team that stops believing failures.
  • Maintenance debt. Scripts that break on every UI change because selectors are brittle or logic is duplicated across files. The cost is rework on each release.
  • Coverage debt. Tests that cover trivial paths while business-critical flows go unchecked. The cost is false confidence, which is more expensive than no confidence.
  • Runtime debt. A suite that takes so long nobody waits for it. The cost is feedback that arrives after the decision it was meant to inform.

The compounding signal is a loss of trust. Once engineers start treating a red build as noise, the suite has stopped functioning as a gate regardless of how many tests it contains. Every remedy below exists to get that trust back.

Count the tests nobody acts on. That number, not the total test count, is the size of your debt.

Automation Suite Health Metrics

Automation suite health metrics are the small set of numbers that show whether a suite is still earning its place. The common mistake is measuring size instead of effect. Test count and percentage of tests automated both rise while a suite is decaying, which is why they make poor health indicators.

The World Quality Report 2025-26, produced by Capgemini and Sogeti with OpenText from 2,000 executive interviews across 23 countries, reaches the same conclusion and recommends replacing “percent of tests automated” with “indicators that matter — customer impact, release velocity, and defect containment”. The same report found automation coverage averaging only a third of test cases, with nearly 50% of organisations still in the planning stage.

How to measure test debt

Measure test debt with 6 metrics, each with a stated formula and a threshold agreed before you start looking at the numbers. Agreeing the threshold afterwards is how teams talk themselves out of acting.

MetricFormula or calculationWhat unhealthy performance looks likeRecommended action
Flakiness rateTests with both a pass and a fail on identical code ÷ total tests, measured over a rolling 7 daysAbove 1% of tests, or any flaky test on a business-critical pathQuarantine above threshold, fix within a fixed window, track the count weekly
Suite pass rate on mainGreen runs on the main branch ÷ total main branch runsBelow 90%, the benchmark CircleCI publishes. Below 80% the suite has stopped gatingStop adding tests. Stabilise what exists before extending coverage
Mean time to greenMedian minutes from a red main branch to the next green runAbove roughly 1 hour, or trending upward across quartersShorten the feedback loop: parallelise, split the suite, fix the slowest failures first
Maintenance shareQA hours spent fixing existing tests ÷ total QA automation hoursAbove 20%, the threshold set out in our automation challenges and ROI guide. Above 40% the suite is consuming the teamRefactor the shared layers: selectors, waits, test data, page objects
Critical path coverageBusiness-critical flows with a passing automated test ÷ total business-critical flowsBelow 80%, while total test count keeps risingRebalance. Delete low-value tests and cover the gaps
Suite runtimeWall-clock minutes for the full regression run in CILonger than the team is willing to wait, so people merge without itTier the suite: fast checks on pull requests, full regression nightly

At QA Madness, an automation engagement opens with a process audit and strategy stage, which is where these baselines are recorded before any script is written or changed.

Which metrics to drop

Drop any metric that improves while the product gets worse. 3 are worth removing from reporting, because each one rewards activity rather than outcome.

  • Total test count. A suite grows whether or not the new tests are useful. Counting them rewards volume.
  • Percentage of tests automated. This rises when manual tests are deleted, which is not an improvement.
  • Line coverage used on its own. Coverage measures which lines executed, not whether anything was asserted about them. It is useful alongside defect containment and misleading by itself.

A healthy suite is one whose failures people act on within an hour. Every metric above is a proxy for that.

How to Fix Flaky Tests in CI/CD

Fix flaky tests in CI/CD by measuring flakiness explicitly, quarantining the worst offenders out of the blocking path with a deadline attached, and fixing the shared root causes rather than individual tests. Retries alone do not fix flakiness, and the tool vendors say so.

A flaky test is one that produces both a passing and a failing result on identical code. That definition comes from Google, and it matters because it separates flakiness from a genuine intermittent bug in the product, which deserves a different response.

Where flaky tests come from

Flaky tests come mostly from timing and concurrency, not from unusual edge cases. The most cited study of root causes is An Empirical Analysis of Flaky Tests by Luo, Hariri, Eloussi and Marinov. It examined 201 commits that fixed flaky tests across 51 open-source projects. Async wait problems accounted for 45% of the categorised cases, concurrency for 20% and test order dependency for 12%.

Scope is the other strong predictor. Google’s analysis of where its flaky tests come from reported that 0.5% of its small tests were flaky, against 1.6% of medium tests and 14% of large tests, and concluded that test size is more predictive of flakiness than the tool used. Google was running around 4.2 million tests at the time, of which roughly 63,000 had a flaky run over a week.

The practical reading is that a broad end-to-end suite will always carry more flakiness than a unit suite, and that moving a check down the stack is often a more effective fix than debugging it where it sits.

What flakiness rate is acceptable

An acceptable flakiness rate depends on test scope, and 0% is not a realistic target for end-to-end tests. Google reported a continual rate of about 1.5% of all test runs returning a flaky result, and that almost 16% of its tests had some level of flakiness. Meta has published that its own flakiness floor sits well below 1% for unit tests and reaches 10% for some end-to-end frameworks.

A workable policy for most teams is 3 tiers. Under 1% of tests flaky in a rolling week is tolerable and worth tracking. Between 1% and 5% needs a standing remediation effort. Above 5%, stop adding tests until the rate comes down, because new tests inherit the same broken foundations.

One threshold is absolute regardless of rate: no flaky test on a business-critical path. Google found that about 84% of the transitions it observed from pass to fail involved a flaky test, which is exactly how a real regression gets dismissed as noise.

Why retries alone do not fix flakiness

Retries hide flakiness rather than remove it, and the cost stays on the books. Playwright’s retry documentation reports a test that failed first and passed on retry as “flaky” rather than passed, which is the right behaviour because it keeps the signal visible. Many teams then ignore that signal.

The clearest warning comes from Gradle, whose own test retry plugin documentation states that “retrying tests alone is not a viable flaky test mitigation strategy” and that the plugin “should only be used alongside processes for tracking and fixing discovered flaky tests”. Cypress makes a similar point about its cloud reporting, noting that a test can show a zero final failure rate while still exhibiting flake, so the build goes green while the instability and its cost remain.

Retries are still worth configuring. They stop a single bad run from blocking an unrelated change. They are a containment measure, and containment without remediation is how a suite reaches 16% flakiness.

At QA Madness, the maintenance stage of an automation engagement covers exactly this work. Tests are reviewed and refactored to reduce flaky failures, outdated scripts are removed, selectors are updated and unstable tests are split, before any of it slows a release or costs the team its trust in the suite.

Measure flakiness, contain it with retries, then fix the shared cause. Teams that stop at containment are paying interest indefinitely.

Fix, Quarantine, Refactor or Delete

Decide each failing test’s fate using 4 dispositions: fix, quarantine, refactor or delete. Each needs a named owner and a time limit. Without a deadline, quarantine becomes permanent, which is the most common way a suite quietly stops gating anything.

Dropbox’s engineering team documented this problem directly when describing its automated build health system: the manual quarantine rotation became too operationally expensive to sustain, which is why it was automated. Uber has published that its guidance is to avoid running flaky tests in CI at all, with unhealthy tests tracked by ticket and deadline, because a flaky test ignored in CI leaves you unable to tell whether a fix worked.

Those 4 dispositions cover the 5 situations below, which account for almost everything a team will meet.

SituationRecommended actionOwnerTime limitRelease impact
Test fails consistently and the product is really brokenFix the product, not the testFeature team that owns the codeBefore mergeBlocks the release. This is the suite working correctly
Test is flaky but covers a business-critical pathFix the test, keep it blocking while you doAutomation engineer who owns that area5 working daysStays blocking. Accept the noise rather than lose the coverage
Test is flaky on a non-critical pathQuarantine out of the blocking set, keep it running and reportingAutomation lead, with a tracked ticket10 working days, then it is deletedNon-blocking. Still visible in reports
Test breaks on every UI change, or duplicates logic found in several filesRefactor the shared layer, not the individual testAutomation engineer, in a planned maintenance slotNext maintenance cycleNo immediate impact. Prevents recurring cost
Test covers a removed feature, duplicates another test, or has never caught a defectDelete itAutomation lead, with QA lead sign-offImmediateSuite gets faster. No coverage lost

At QA Madness, the CI/CD integration stage sets which checks block a merge and which report without blocking, across Jenkins, GitHub Actions, GitLab CI, CircleCI and Azure Pipelines.

2 rules make this table work in practice. The time limit has to be enforced by something other than goodwill, which usually means the quarantine list is reviewed in a standing meeting and expired entries are deleted automatically. And deletion has to be a real option, because a team that may not delete tests will quarantine indefinitely instead.

Deleting a test that has never caught a defect costs you no coverage. It removes a cost that was never buying anything.

When to Refactor Automated Tests

Refactor automated tests when the same change breaks several of them at once, because that pattern shows the duplication lives in the suite rather than in the product. A single failing test is a fix. 5 tests failing on one selector change is a refactor.

4 signals justify the work.

  • One product change breaks multiple tests. Selectors, waits or navigation logic have been copied rather than shared. Extract them into a page object or helper layer.
  • Maintenance share passes 20%. When more than a fifth of automation hours go on repairs, the suite’s structure is the problem, not the individual scripts.
  • Tests depend on each other’s state. Test order dependency causes 12% of flaky cases in the Luo study. Each test should create and clean up its own data.
  • Setup runs through the interface. Driving sign-up and seeding data through the UI makes every test slower and more fragile. Build state through the API instead.

That last point is the highest-leverage change available to most teams. On a GovTech engagement, QA Madness built an API-level setup layer that creates test data before the UI scripts run. Each legacy platform got its own locator strategy. The engagement started from no automation at all and reached 180 automated tests, with 859 test cases written and updated and 252 bugs reported by a 3-person team. Regression testing time fell by 35% on the most mature system in the portfolio, measured from the automation coverage ratio on that system rather than across the whole estate.

At QA Madness, that GovTech team produced 5 to 7 new scripts a month from a single engineer before a custom multi-agent AI framework raised output further. Every AI-generated artefact was reviewed by a senior QA engineer before it entered the suite.

Refactoring is also where API-level testing earns its place. Checks that can run against an endpoint rather than a rendered page are faster, more stable and cheaper to maintain, which is the argument set out in our API automation testing article and delivered through our API testing services.

Refactor the layer, not the test. If the fix does not prevent the next 5 failures, it was a patch.

Test Automation Maintenance Best Practices

Test automation maintenance best practices come down to treating the suite as a product with an owner, a budget and a review cycle, rather than as a project that finished when the tests were written. A suite with no named owner decays by default.

6 practices keep a suite healthy over years rather than months.

  • Give every test an owner. Ownership recorded in the repository, mapped to the team that owns the feature. Unowned tests are the ones that sit broken for months.
  • Budget maintenance explicitly. Allocate a fixed share of automation capacity to repairs and refactoring each sprint. Maintenance that competes with new coverage always loses.
  • Review suite health on a fixed cadence. Monthly for the metrics above, quarterly for a deeper look at what to delete. Reviews that happen when someone remembers do not happen.
  • Keep tests independent. Each test creates its own data, asserts, then cleans up. Shared state is the root of order dependency and a large share of flakiness. For products in the UK or the European Union, generate that data rather than cloning production records, since the General Data Protection Regulation treats a copy in a CI environment as processing like any other.
  • Tier the suite by speed. Fast checks on every pull request, full regression nightly, long-running suites on a schedule. Feedback that arrives too late changes no decisions.
  • Delete on a schedule. A standing rule that tests which have not failed meaningfully in a year are reviewed for removal keeps runtime under control.

At QA Madness, automation engagements run through 5 stages, ending in maintenance and evolution, where test stability is monitored, scripts are updated for new features and the framework is refined. The client owns all of the code, which matters because a suite you cannot maintain without the original supplier is itself a form of debt.

At QA Madness, that cadence held 95% coverage of business-critical flows on a Web3 insurance platform across 18 months and more than 1,200 tests, with Playwright and Postman running smoke and regression through GitHub Actions.

If your suite is large enough that nobody can say which tests still earn their place, an external review is usually faster than an internal audit, because the people who wrote the tests are the least able to judge them. That is what a QA audit is for.

One warning on scope. Performance and load checks degrade in the same way functional suites do, and a performance threshold that was set 2 years ago against different infrastructure is no longer a meaningful gate. Those thresholds need the same review cadence, which is part of our performance testing services.

Maintenance is not overhead on automation. It is the part that keeps the original investment working.

Where Paying Down Test Debt Does Not Pay Off

Paying down test automation debt is not always the right call, and 3 situations make the work hard to justify.

When the work does not return

It does not pay off on a product being replaced. A suite covering a system scheduled for rebuild within a year should be stabilised only where it protects a live revenue path. Everything else can be left to run or switched off.

It does not pay off when the architecture is the cause. If tests are flaky because the application has real race conditions, the fix belongs in the product. Hardening tests against a real concurrency bug hides a defect your users will eventually meet.

It does not pay off as a substitute for a coverage decision. Repairing 200 tests that cover low-value paths is expensive and changes nothing. Decide what should be covered first, then repair only what survives that decision.

What suite metrics cannot tell you

There is also an honest limit on what any of these measures. A suite can score well on every metric in this article and still miss the defect that matters, because automated tests only check what someone thought to assert. Exploratory testing and human review cover the rest, and no amount of suite maintenance replaces them.

The honest boundary: test debt work is worth doing when the suite is meant to gate releases for years. On a system with a known end date, the right answer is often to stop paying and let it run.

FAQs

What is test automation debt?

Test automation debt is the accumulated cost of automated tests that consume more than they return, through flakiness, brittle maintenance, misplaced coverage or excessive runtime. Like technical debt in application code, it compounds: each tolerated flaky test and unmaintained script raises the cost of the next change. The clearest symptom is a team that no longer acts on a failing build.

How do you measure test automation health?

Measure test automation health with flakiness rate, pass rate on the main branch, mean time to green, maintenance share of QA hours, critical path coverage and total suite runtime. Each needs a formula and a threshold agreed in advance. Avoid total test count and percentage of tests automated, because both improve while a suite decays.

What flakiness rate is acceptable?

Under 1% of tests flaky over a rolling week is tolerable for most suites, with no flaky tests permitted on business-critical paths. Google has reported about 1.5% of all its test runs returning a flaky result, and that end-to-end tests are far flakier than unit tests: 14% of its large tests against 0.5% of its small ones. Judge the rate against test scope rather than against 0%.

Should flaky tests be deleted?

No, not as a first response. Quarantine the test out of the blocking set so it stops wasting investigation time, keep it running and reporting, and attach a ticket with a deadline. Delete it only if the deadline passes without a fix, or if the test covers a path that no longer justifies the maintenance. Deleting on first failure removes coverage you may need.

When should automated tests be refactored?

Refactor automated tests when a single product change breaks several of them at once, when maintenance passes roughly 20% of automation hours, when tests depend on each other’s state, or when setup runs through the user interface instead of the API. Each of those indicates the duplication sits in the suite’s shared layers, so refactoring the layer prevents the next round of failures rather than patching this one.

How often should a team review automation health?

Review the health metrics monthly and run a deeper suite review quarterly, covering what to delete and what to rebalance. Quarantined tests need a shorter cycle, ideally a standing weekly check, because quarantine without expiry becomes permanent. Reviews that happen only when someone notices a problem are too late to prevent one.

Paying Down the Debt

Test automation debt is measurable, and that is the part most teams skip. Pick the 6 metrics above, agree a threshold for each before you look at the current numbers, and publish them where the team sees them. Then work the dispositions: fix what is really broken, quarantine what is flaky with a deadline attached, refactor the shared layers rather than individual scripts, and delete what has never caught anything.

The first move is small. Measure your flakiness rate over the next 7 days and count how many failing tests nobody investigated. That second number is your real debt, and it is usually larger than anyone expects.

QA Madness provides independent software testing services, including test automation setup, maintenance and QA audits, for SaaS companies, startups and software vendors across the UK, Europe and North America, from technical offices with headquarters in Warsaw, Poland.

Suite stopped catching things? Tell us your stack, your runtime and your current pass rate, and we will tell you where the debt sits. See our automated testing services or book a consultation.

Avoid automation debt with professional test automation services

Contact us

Anastasiia Letychivska

Recent Posts

10 Best Test Automation Companies in 2026

Last updated: 8 October 2026 This guide compares 10 companies that build and run automated…

6 days ago

10 Best Manual Testing Companies in 2026 (Top Picks)

Last updated: 2 October 2026 This guide compares 10 companies that sell manual software testing,…

2 weeks ago

How to Build a Performance Testing Program for SaaS: CI/CD Integration, Test Types, and Tool Selection

Last updated: 2 October 2026 This guide explains how to build a performance testing programme…

2 weeks ago

Best 10 QA Companies for Gaming Apps in 2026

Last updated: 29 September 2026 This guide compares ten QA companies that test gaming apps,…

3 weeks ago

API Contract Testing for Microservices: How to Catch Breaking Changes Before They Reach Production

Last updated: September 23, 2026 This guide explains API contract testing for microservices: what it…

3 weeks ago

Best 10 E-Commerce App Testing Companies in 2026 (Top Picks)

Last updated: September 16, 2026 This guide ranks 10 QA partners for mobile e-commerce apps…

3 weeks ago