Dev.to WebDev 🛠 Dev 👁 0 📖 6 min read

What is regression testing?

Summary Regression testing proves that what worked yesterday still works after today’s change. More tests make a suite slower and noisier; the fix is changing the suite itself. The numbers 84% of Google’s pass-to-fa

Summary
Regression testing proves that what worked yesterday still works after today’s change. More tests make a suite slower and noisier; the fix is changing the suite itself.

The numbers

  • 84% of Google’s pass-to-fail transitions involved a flaky test
  • 14–52% of builds had a flaky failure in five Microsoft projects
  • Two-thirds of Mozilla’s test failures were false alarms

Regression testing is re-running checks after a change to confirm that what worked before still works. A regression is anything that used to work and has stopped after a change to the code, configuration or environment. Most teams automate it in CI on every change, pairing a quick smoke check with a fuller run on key journeys.

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. Fixing that starts with understanding what regression testing covers, the types teams schedule, how it differs from smoke testing and why growing a suite multiplies the noise.

1.23% of Google’s test targets found a real breakage.

What is regression testing?

In plain engineering terms, when you ship feature X, regression testing checks that you have not broken features B, C, D and E that worked before.

Regressions do not require application code changes; a configuration edit or a shift in the operational environment can break existing behaviour. Tightening a Content Security Policy header at the CDN, for instance, can block a payment provider’s verification frame from loading during checkout. Not a line of checkout code has changed in the repository, yet customers submitting a valid card can no longer reach order confirmation.

The payment code itself may never have been touched.

Regression checks span unit tests, integration tests, end-to-end browser checks and pre-release manual passes. Teams choose among three scheduling strategies. Retest-all runs the entire suite after every change. Selective regression testing runs only the checks tied to modified code and its dependencies. Prioritised regression testing orders the suite by business risk so high-consequence journeys run first. Retesting a fixed bug (confirmation testing) is a separate job: it verifies the defect is gone, while regression testing checks that the fix broke nothing else.

Smoke testing vs regression testing

Smoke tests and regression tests both run in CI, yet they answer different questions at different speeds. A smoke test is the quickest set of sniff checks to verify a build is alive enough to test, confirming login and the main flow. A regression suite covers the full book of expected behaviours, down to whether a checkbox on a legal page still works.

Dimension Smoke Regression Acceptance Exploratory
Purpose Confirm the build is alive enough to test Confirm existing behaviour has not gone backwards Verify a new feature works as intended Find breakage nobody scripted yet
Scope Core paths such as login and the main flow Broad set of established product scenarios The specific feature being launched Unscripted paths explored as a user would
When it runs Every build or deploy; nightly for heavy environments On changes (selected), and on releases or schedules Ahead of or at launch Ongoing; findings feed the regression suite
What a failure means Stop immediately; the build is badly broken A change broke something that used to work The new feature is not ready to ship A new bug to fix and add to regression

With the layers clear, the harder question is why the regression layer so often loses engineers’ trust as a suite grows.

Why more tests don’t make regression testing better

Regression suites grow by addition and rarely shrink. Every incident spawns a new check, and nobody wants to delete an old one in case it guards an obscure edge case. Published data from four large engineering organisations shows where that growth leads (see our roundup of AI-era software quality stats).

Start with how rarely an individual target catches a genuine break. Across 5.5 million targets in Google’s study, 2.07% both passed and failed, and only 1.23% found a real breakage once flaky targets were removed. Almost 16% of Google’s tests showed some flakiness, and although only about 1.5% of runs reported flaky results, flaky tests were behind 84% of pass-to-fail transitions. Engineers met flakiness at the exact moment a green suite turned red. Elsewhere, the pattern is identical: 14% to 52% of builds across five Microsoft projects contained a flaky failure, two-thirds of Mozilla’s 38,596 manually classified job failures were false, and at Facebook, where nearly 99.9% of dependency-selected targets passed, flaky tests outnumbered genuine failures four to one.

4× more flaky tests than real failures at Facebook.

That signal-to-noise ratio changes team behaviour quickly. When most red builds have nothing to do with the author’s diff, developers hit re-run until CI goes green, and genuine regressions hide beside familiar flakes. A deeper structural flaw compounds the noise: end-to-end tests are usually pinned to DOM selectors, internal IDs and fixed click paths that shift during ordinary releases. Routine interface work breaks tests guarding healthy features, forcing engineers to patch locators before release B can even be compared with release A.

Adding more scripted tests and more runners multiplies both the maintenance burden and the noise. Drastic improvement requires changing three properties of the suite itself.

Three changes to elevate your regression testing.

Drastic improvement requires changing three structural properties of the suite itself. First, replace scripts tied to selectors, URLs and single-run paths with repeatable flows anchored to user goals, so the same journey compares cleanly across builds. Second, stop running the entire suite on every push; run only what the change actually touches, and state plainly when nothing ran instead of returning a green tick by default. Third, separate real bugs from environment hiccups so every result means one thing: passed when the journey was observed working, failed when the product broke and inconclusive whenever the setup prevented a fair test. Together, those three shifts turn regression testing from a growing maintenance tax back into a gate engineers trust, where a red build is worth stopping for because it finally means the product broke.

Frequently asked questions

What is the difference between retesting and regression testing?

Confirmation testing (often called retesting) verifies that a specific bug fix worked by re-running the exact scenario that failed before. Regression testing checks everything else around it, confirming that the fix or feature change did not break unrelated behaviour that worked previously. Both run after a change, yet they answer different questions.

Smoke testing vs sanity testing?

In everyday usage, smoke testing is a shallow, broad check on a new build to verify the app starts and its core paths work before deeper testing begins. Sanity testing is a narrow check on a specific area after a minor fix to confirm the changed behaviour works sensibly before full regression runs. [TBC: formal ISTQB definitions of smoke vs sanity testing]

Is regression testing manual or automated?

Most teams use both. Automate the recurring journeys that matter most so they run consistently on every pull request and release without slowing engineers down. Reserve human effort for exploratory testing on new features, awkward edge cases and visual judgement, then turn any reproduced bugs into automated regression checks for future builds.

How often should you run regression tests?

Run targeted regression checks on every pull request, selecting only the tests affected by the change, and validate the rebased result before merging to main. Run broader end-to-end flows after staging deploys and on releases. Push heavy suites, such as mobile emulators, onto nightly schedules or opt-in pull request labels.

What are the types of regression testing?

Teams generally choose among three strategies. Retest-all runs the entire suite after every change, which works only while suites stay small. Selective regression testing runs only the checks tied to modified code or its dependencies. Prioritised regression testing orders checks by business risk so high-consequence journeys run first.

Originally published on the Antidote blog, written by Oliver Watson.

📰 Read the original article on Dev.to WebDev

Originally published by Dev.to WebDev. Aggregated on AIWithGhost for educational purposes — full credit and traffic to the original publisher.