---
title: "Fix Flaky Tests: Scope and Ownership | Agrim Intelligence"
description: "Flaky tests are easier to contain when you classify why each end-to-end test fails and name who owns it, before you rerun or auto-repair anything."
source: https://agrim.ai/insights/flaky-tests
---

# Fix Flaky Tests: Scope and Ownership

By Ayush Gupta · Published December 3, 2026 · 8-minute read

In short

Flaky tests are easier to contain when you classify why each end-to-end test fails and name who owns it, before you rerun or auto-repair anything.

**In short:** Flaky tests are easier to contain when you classify why each end-to-end test fails and name who owns it, before you rerun or auto-repair anything. Checksum's 2026 report attributes failures to selector updates, flow changes, environment instability and loading or timing issues. In our view, self-healing is safe only when every repair reaches a human reviewer.

Microsoft researchers define [flaky tests](https://www.microsoft.com/en-us/research/wp-content/uploads/2019/11/LamETAL19RootFinder.pdf) as automated tests that may return both passing and failing results on the same version of the code. In a one-month evaluation across five software projects, they observed that 4.6% of individual test cases behaved this way.

Teams that spend their weeks repairing end-to-end tests get further by narrowing what they automate and naming an owner for each test than by buying a faster fixer. This guide walks through that job in order: scope, measurement, tool choice, self-healing, the cases where the basics fail, and the cases where you should not automate at all.

## Set strict automation scope and test automation ownership before you chase end to end test flakiness

You decide what to automate by how often a scenario runs and what it costs to build, then give every automated test a named owning team. The [analysis of when test automation stops paying for itself](https://ardura.consulting/blog/when-test-automation-stops-paying-for-itself/) names execution frequency as the primary driver of return on investment, because accumulated savings depend on how often tests run. A scenario that runs rarely is a weak candidate for a full-journey UI test.

Cost belongs in the scope decision too. The same analysis gives an order of magnitude, assuming an existing framework and configured environment: 4 to 10 hours for an end-to-end test through the user interface that covers a full business journey. It applies the upper bound to journeys involving payments, third-party integrations or complex state. We read journeys involving third-party integrations as the ones most exposed to the unavailable external resources the Microsoft researchers list among the causes of non-deterministic outcomes.

Ownership is the other half. We would keep the scope as a short list in the repository, with one team named against each automated test. That team triages the test's failures and approves its repairs. An owner knows who acts, but not yet where the hours go.

## Track where maintenance hours are lost to reduce flaky test maintenance

Once each test has an owner, count which failures cost the hours before you spend more time repairing tests after interface changes. Checksum's [QA benchmark report](https://checksum.ai/reports/qa-benchmark-report-2026) analyzed over one million production automation runs across hundreds of applications. It attributes failures to selector updates (32%), flow changes (27%), environment instability (22%) and loading or timing issues (19%).

We read selector updates and flow changes as the share that follows interface changes. A locator repair or a rewritten step addresses those. Environment instability and loading or timing issues need a different fix, and updating a selector will not touch them. The split tells you whether the next hour goes into the tests or into the environment.

The report also puts a price on the problem: a suite of 500 automated tests requires more than $1.7 million every year, equal to at least one full-time engineer's capacity. That is a vendor's figure, so treat it as a prompt to measure your own suite. Ardura's analysis says teams can estimate unmeasured maintenance overhead by tallying repair-only commits, estimating hours per commit and counting false red pipeline runs over two quarters. It also gives a baseline: UI-based test suites require annual upkeep of roughly 15% to 30% of their initial build hours, with products under active UI development reaching the higher boundary. Those numbers are what any tool has to beat.

## Choose automated regression testing tools against your own failure data

With your own tally in hand, a growing organization should pick automated regression testing tools by testing them against its own failure categories, run frequency and review flow, not by a vendor's headline rate. Checksum's report compares median failures per 100 test runs, 14.8 for manual or legacy suites against 2.7 with Checksum, calculated across runs in CI, pre-deploy pipelines and synthetic production monitoring.

A candidate tool should be measured on your own suite and pipelines, and the failures it removes should be sorted into the four failure categories. If most of your lost hours come from environment instability, a locator-repair feature will not move the number.

Count the setup too. Ardura's analysis says a team starting from nothing typically needs 120 to 300 hours before a single test delivers any value. If you are starting from nothing, we would add that figure to a tool's cost, and ask whether the tool's repairs land in a form your owning teams can review.

## Judge self healing test automation by whether repairs stay reviewable

Checksum's report describes self-healing as keeping deterministic code as the source of truth. When a script breaks, the report says AI should update the code and submit a pull request. We would have a person review each of those pull requests. The same report says roughly 70% of failures are repaired autonomously while approximately 30% need only quick human review.

The 70% figure is the vendor's own claim. We would apply one rule at review. A proposed update that changes how a test finds an element is a maintenance fix, while one that changes what the test expects is a question about product behavior and needs a decision from the owner.

The Microsoft paper gives a reason to hold that line. It reports that builds where engineers disregarded flaky test failures suffered many more crashes in deployment than builds that did not contain any flaky test failures. A repair that turns red to green without a reader has the same effect as disregarding the failure. That still leaves the failures no repair touches.

## How to fix flaky tests when ownership and repair steps do not stabilize the suite

When scope, ownership and reviewed repairs leave the suite unstable, you classify each remaining failure by cause and isolate it from the gating pipeline until its owner has a root cause. The scale explains why this happens. The Microsoft paper cites research indicating that nearly 16% of 4.2 million distinct tests failed independently of changes in code or tests within Google's continuous integration pipelines.

Its authors say non-deterministic outcomes can come from concurrency factors such as thread and event scheduling order, or from unavailable external input and output resources such as disks and networks. No locator repair fixes either one. For flaky tests root cause analysis, a [multivocal literature review](https://arxiv.org/abs/2212.00908) of 651 publications, academic and industry, structures the research into causes, detection, impact and responses. We read that as a ready-made classification: label each failure's cause before assigning a response.

The strongest objection to this approach is that a better platform makes the discipline unnecessary, and Checksum's median of 14.8 versus 2.7 failures per 100 runs, across CI, pre-deploy pipelines and synthetic production monitoring, points that way. We accept it for selector and flow repairs. It does not move our conclusion on environment and timing failures, and the figure is the vendor's own. That leaves the cases where no amount of triage pays the suite back.

## Do not rely on automated end-to-end regression tests when maintenance outruns the savings

As the maintenance cost attributable to one run approaches the cost of running the check by hand, the number of runs needed to break even grows without limit. Ardura's analysis calculates break-even runs by dividing the initial construction expense by the manual execution cost minus the maintenance cost attributable to one run. When per-run maintenance equals the manual effort, the required runs reach infinity and the suite never recovers its cost. In Ardura's example, break-even lands at 40 runs but the scenario is rebuilt after 15, so the test does not pay for itself even though the arithmetic is correct. From those facts we would decide as follows:

- Leave a scenario manual or at a lower test layer when its flow is still being redesigned, since a rebuild before break-even wastes the build.
- Consider retiring a test whose maintenance cost per run, estimated from the two-quarter tally, approaches the cost of running it manually.
- Never accept green results from a repair mechanism that nobody reviews.

## Frequently asked questions

### How can teams stop spending engineering time repairing end-to-end tests every time interfaces change?

Count which failures cost the hours before you repair more tests after interface changes. Checksum's QA benchmark report attributes failures to selector updates (32%), flow changes (27%), environment instability (22%) and loading or timing issues (19%). We read selector updates and flow changes as the share that follows interface changes, which a locator repair or a rewritten step addresses. The split tells you whether the next hour goes into the tests or into the environment.

### Do self-healing tests hide real bugs?

Checksum's report describes self-healing as AI updating the code and submitting a pull request when a script breaks; we would have a person review each one. The Microsoft paper reports that builds where engineers disregarded flaky test failures suffered many more crashes in deployment than builds that did not contain any flaky test failures. A repair that turns red to green without a reader has the same effect as disregarding the failure.

### How should teams define what to automate and who owns end-to-end test maintenance?

Teams decide what to automate by how often a scenario runs and what it costs to build, then assign every automated test a named owning team. The analysis of when test automation stops paying for itself names execution frequency as the primary driver of return on investment and gives an order of magnitude of 4 to 10 hours, assuming an existing framework and configured environment, for an end-to-end UI test covering a full business journey, with the upper bound for journeys involving payments, third-party integrations or complex state. We would keep the scope in the repository, with one team named against each automated test to triage failures and approve repairs.

### How should a growing engineering organization choose automated regression testing tools?

A growing organization should pick automated regression testing tools by testing them against its own failure categories, run frequency and review flow, not by a vendor's headline rate. Checksum's report compares median failures per 100 test runs, 14.8 for manual or legacy suites against 2.7 with Checksum, calculated across runs in CI, pre-deploy pipelines and synthetic production monitoring. Candidate tools should be measured across your specific pipelines. For a team starting from nothing, the analysis of when test automation stops paying for itself says typically 120 to 300 hours pass before a single test delivers any value.

## Sources

- [Microsoft Research paper on flaky tests](https://www.microsoft.com/en-us/research/wp-content/uploads/2019/11/LamETAL19RootFinder.pdf)
- [Checksum QA benchmark report](https://checksum.ai/reports/qa-benchmark-report-2026)
- [Ardura Consulting's analysis of when test automation stops paying for itself](https://ardura.consulting/blog/when-test-automation-stops-paying-for-itself/)
- [Multivocal literature review of flaky tests (arXiv)](https://arxiv.org/abs/2212.00908)

## About the author

**Ayush Gupta**, Director of Engineering Services

Started at BlackRock, then built production systems in fintech and Web3, including a gasless USDT payment rail with more than 80,000 transactions, before joining Agrim Intelligence.

[Ayush Gupta on LinkedIn](https://www.linkedin.com/in/ayush-gupta-06101994/)
