Duku AI is now Antidote
How to make regression testing drastically better, not just bigger
Regression testing gets drastically better from three changes to the suite, not from more tests and runners.
Member of Ops Team
·
·
9 min read

Summary
Better regression testing comes from three changes, not more tests: repeatable flows, running only what each change touches, and results that mean what they say.
The numbers
Regression testing gets drastically better from three changes to the suite rather than from more tests and runners: building repeatable flows comparable across versions, running only what each change touches, and making every result mean what it says. If you want the fundamentals and how regression differs from smoke testing first, read What is regression testing?.
Across more than four billion test outcomes in one month at Google, only 1.23% of test targets found a real breakage once flaky targets were filtered out. Almost every red build an engineer sees points to noise rather than a regression, and every false alarm trains people to hit re-run instead of opening the logs. Adding more tests and more parallel runners widens that noise. Making regression testing drastically better requires three structural changes to the suite itself, drawn from how we build and run repeatable checks from one version of an app to the next.
1.23%
of Google’s test targets found a real breakage.
Each row below maps one of those three changes, contrasting the defaults that make suites brittle and noisy with what replaces them.
From | To |
|---|---|
Scripts tied to selectors, URLs and single-run paths | Repeatable flows tied to user goals, comparable across builds |
Running the entire suite on every change | Running what the change touches, and saying when nothing ran |
Red means anything from a real bug to an environment hiccup | Every result means one thing: passed, failed or inconclusive |
The first change is the foundation, because a regression only appears when the same check runs cleanly on two versions.
Change one: build repeatable flows you can compare from one version to the next
A regression is a comparison between two versions: the same user journey, two builds, a different outcome. Most automated end-to-end suites break that comparison on contact with a routine release. Scripts tied to CSS selectors, element IDs and fixed click sequences fail on frontend refactors alongside real defects, so engineers spend the morning patching locators and lose the line between a broken product and a rewritten test.
We learned that a check survives normal releases only when its identity is the user’s goal and what the user should see when it finishes, rather than how the page is wired. Describe each flow in one sentence, such as “Export last month’s invoices as a CSV file”, with a clear “done when” goal. Because nothing is scripted against page internals, a moved button does not break the flow. Judge completion from the screen, treating the URL as a hint at most: error states render on expected routes, and refactors change paths without breaking journeys. Give each user role its own test login as well, because permission boundaries hide regressions that affect only one kind of account.
Surviving redesigns is half the comparison; disciplined runs are the other half. Stamp every result with the build it tested, so findings group by release and compare against the version before. Start each run from a fresh state so leftover sessions or mutated data cannot distort the next check. Compare against a baseline of recent healthy runs rather than a single previous run, which one unusual outcome can skew. Replay checks enough times to separate flaky failures from consistent ones, since a single red run cannot tell a broken build from a hiccup.
Three guardrails keep that baseline honest. Void the comparison if another deploy lands mid-run, because you can no longer tell which version produced which outcome. Mark cross-environment comparisons inconclusive and never report them as regressions, since infrastructure differences mimic product breaks.
Never let a failing run rewrite the trusted baseline, or a broken deploy’s error page becomes the reference for the next release.
Once flows compare cleanly, stay selective about what enters the suite. No team can list every scenario up front, because an application’s interaction space is effectively infinite. Use exploratory testing to find failures outside existing checks, and promote reproduced findings into the suite (see our exploratory testing article). Prioritise by consequence rather than count: automated findings earn attention only once tied to what they would cost the business if shipped.
Repeatable flows sit alongside the engineering checks you already run. Unit and integration tests check code-level expectations, while user-goal flows confirm that real journeys hold across releases and let you track how many tests survive a release untouched.
Change two: run what the change touches, and say when nothing ran
Running every test on every pull request works when a repository holds fifty fast checks. Once a codebase spans multiple services and hundreds of end-to-end journeys, running everything on every push stalls agile delivery. Continuous regression testing only works while the author still has the diff in mind, which means choosing what runs rather than running the whole suite blindly.
Start by separating two questions for every pull request: can this change be tested, and is this specific revision worth a run? Draft pull requests, trivial updates and rebases that leave the branch’s code untouched rarely warrant a fresh run, whereas heavy conflict resolution does, and force pushes require checking what actually changed since the previous run. Test runs earn their keep when a revision alters behaviour, whereas re-running on typo fixes and clean rebases wastes time without adding confidence. When we backtested such a rule on one customer’s pull request history, only a small minority of pull requests would have triggered testing.
At Google’s scale of 5.5 million test targets and four billion monthly outcomes, running everything on every commit is unworkable. Facebook addressed that with predictive test selection, cutting the infrastructure cost of testing changes by a factor of two while still reporting over 95% of individual test failures and over 99.9% of faulty changes.
Half
the cost of testing at Facebook, with test selection.
Most teams capture the bulk of that gain without machine learning by maintaining a dependency graph. CI then runs only the projects a change touches, with inputs tracked so editing shared code re-runs its dependents. Expensive suites belong under the same rule: run them only when their own inputs change, so an unrelated edit neither wastes compute nor lets an unrelated failure block a merge.
Selective runs carry one hazard: when a change affects nothing testable, a standard CI job exits zero over an unverified diff.
A selective run that tests nothing must say so plainly instead of showing a green tick, so reviewers never mistake “skipped” for “verified”.
Finally, validate the exact commit you ship. Pull request checks run against the base commit a branch started from, which often moves on during review. Validate the combined result on current main before shipping, because changes that passed separately can still break together, and no earlier branch run has covered that merged state.
Change three: make every result mean what it says
A regression gate protects production only while engineers trust it. As the Google and Microsoft studies covered in What is regression testing? show, flaky failures quickly train teams to ignore red. When a check runs a batch of replays, one flaky run must not turn the whole gate red, because a genuinely broken build fails every run; at minimum, the output must separate flake from a consistent failure. As Google staff on Google’s flaky-test post noted, a persistently failing test gives a clear signal of what to fix, making it far better for a testing system than a flaky one.
Red must mean the product broke
Fixing flake starts with measuring it in CI rather than on a laptop. Almost 16% of Google’s tests had some flakiness, and 86% of the 315 flaky tests Lam et al. (Microsoft, ISSTA 2019) re-ran 100 times locally never flaked on a developer machine. Emulated mobile environments amplify non-determinism further: Google reported that 25.46% of its Android-emulator tests were flaky.
86%
of flaky tests never flaked on a laptop.
We learned to measure stability by replaying an unchanged build where tests really run and counting how often verdicts flip. Separate tooling noise from application instability, so infrastructure hiccups never send engineers hunting through product code for faults in the test setup.
When a test proves flaky, pull it from the blocking gate without losing sight of it. Martin Fowler recommends quarantining non-deterministic tests, fixing them promptly and capping the quarantine (his example allows at most eight tests) so it never becomes a dumping ground, citing lack of isolation, asynchronous behaviour, remote services, time and resource leaks as common causes. Google staff similarly noted that automatic reruns apply only to tests marked flaky or requested by a user. Whenever a test leaves the blocking gate, record why beside it and keep it runnable, so it stays visible instead of becoming a silent blind spot.
Inconclusive needs its own verdict
Binary pass-or-fail reporting forces environment failures into a lie: marking a check “failed” blames the product for a staging hiccup, while skipping it inflates the pass rate. Every suite needs a third outcome for runs that never got a fair test, kept deliberately wide. Blocked and unexplored paths stay distinct from observed journeys with no issue found, because every observation is bounded by its inputs, environment and path. Missing or stale representative observations always yield inconclusive, never fail.
We learned that “failed” must be earned with evidence, because it tells a team their product is broken.
Anything your own setup could explain belongs in inconclusive, and failures of the testing setup must never be reported as product results.
Green must prove something ran
A false green is quieter and more dangerous than a noisy red, because nobody inspects a passing build. Check periodically that every expected CI suite actually executes, and ensure a test failing on its opening step counts as failed or inconclusive rather than dropping out of the pass rate. A filter matching zero targets should say so plainly instead of returning a green tick.
How do you know your regression testing is working?
Test count rewards growing a suite even as stability degrades. Judge regression testing by what reaches users and what the gate costs your engineering team.
Start with delivery outcomes defined by DORA: change failure rate (the ratio of deployments that require immediate intervention following a deployment) and deployment rework rate (the ratio of unplanned deployments triggered by an incident in production). Track both alongside deployment frequency and change lead time (the time from commit to deployment in production) to confirm that stability did not come from stalling releases.
Pair those outcomes with suite-health metrics mapped to the three changes:
Repeatability: the share of tests that survive a release untouched, and whether results record build metadata so one build compares cleanly with the one before.
Targeting: the share of changes where nothing ran, alongside median time from push to verdict.
Honesty: overall red rate, share of red builds passing on straight re-run, verdict flips on an unchanged build, and share of inconclusive runs.
Add one operational metric: time from a red verdict to an engineer knowing why it failed. Concrete evidence, including a recording, exact steps and the observed error, shrinks that gap (see what makes a bug report actionable).
Making red worth stopping for
In Google’s study of four billion test outcomes, only 1.23% of test targets found a real breakage once flaky targets were filtered out. Drastically better regression testing flips that dynamic so a red build is worth stopping for. As we wrote in our piece on the autonomous software factory, every release has to answer one question: “Can the user still sign in and pay?” A repeatable flow is how you ask that question of every version.
Pick the journeys your product cannot afford to break, write a one-sentence “done when” for each, and audit your current suite against them: which ones does it actually observe, do its results stamp the build they tested, and does it tell you plainly when nothing ran? To see how we run repeatable flows across releases, read how Antidote works.
Leave the testing to Antidote.
Antidote proves your product works every time you ship.



