Published November 15, 2026

What is a regression? When a change breaks something that used to work

A regression is a bug where something that used to work breaks after a change. Regression testing is how you check that existing behavior still holds.

software-development
testing
website-maintenance

Short answer

A regression is a bug where something that used to work stops working after a change.

The change might be a new feature, a bug fix, a dependency update, a config edit, or even a change in the environment the software runs in. Regression testing is the work of checking that existing behavior still holds after that change: it looks for defects introduced, or newly exposed, in areas you did not mean to touch.

Why it matters

Most of a product is the stuff that already worked yesterday: login, checkout, permissions, emails, the settings page. New work is usually a small slice. A regression is what happens when that slice quietly damages the rest.

For a founder, the cost is not "a test failed." It is a customer who could check out last week and cannot today, or a permission check that used to block the wrong person and now lets them through. The later you find it, the harder it is to tell which change caused it, and the more real users it may already have hit.

After a production regression, a short, blame-free post-mortem is how a team turns the incident into a better test or a safer release habit, instead of hoping it does not come back.

Kinds of regression

"Regression" is about something that used to be fine getting worse, not only about a button that stops clicking.

  • Functional. A feature stops doing the right thing. A coupon still applies, but guest checkout now fails. This is the meaning most people start with.
  • Performance. The feature still works, but it got slower, heavier, or more expensive to run. A page that used to load quickly now times out at peak, or a query that was cheap now scans the whole table.
  • Visual / UI. The product still "works" in a test that only checks the response, but the layout is broken: a pay button overlaps the total, a form is clipped on mobile, or contrast drops so a label is unreadable.
  • Security. A change reopens a hole you had closed, or drops a check that used to be there. A role that could not export customer data last month can export it after a refactor of the permissions code.

A new bug is a defect in something that never worked correctly. A regression is a deterioration of something that previously did. The same commit can introduce both: the new "stack two coupons" feature might be wrong and guest checkout, which used to work, might break. The distinction matters because the fix and the test are different. For the new feature you are still defining correct behavior. For the regression, you already know what "good" looked like, and you can compare against it.

The ISTQB Foundation syllabus also notes that a change can hurt the same component, other components, connected systems, or the environment around the software, not only the file you edited.

Example

Illustrative story, no real metrics.

A small store has a checkout that works for guests and for logged-in customers. The coupon SAVE10 takes $10 off. On Tuesday you ship a change so two coupons can be stacked. On Wednesday a guest writes in: they entered a card and the pay step failed. You try it yourself. Stacking two coupons works. Logged-in checkout works. SAVE10 used alone still works. Guest checkout does not.

That failure is a regression. Guest checkout is not the new feature. It used to work, and a change aimed at coupons broke it. The coupon work probably shared a code path, a validation step, or a session check with guest checkout, even if the pull request did not mention guests.

If you only re-tested the new stacking behavior, you would have shipped the break. If you also re-ran the existing checkout cases, including a guest with one coupon, the suite would have failed before customers saw it. Once you know it is broken in production, git bisect can walk the commits between "Monday, this worked" and "Wednesday, it does not" and point at the coupon change, instead of you rereading every diff by hand.

How teams catch them

No single tool catches every kind. Teams combine a few:

  • Regression tests. A suite of checks for behavior that should keep working. The ISTQB calls this a type of change-related testing: after a modification, you look for defects in unchanged areas. These tests are run over and over, so they are a strong candidate for automation, and they can exist at more than one level (a fast unit check, a checkout flow, a permission test).
  • Confirmation testing is not the same thing. After you fix a bug, confirmation testing checks that that failure is gone. Regression testing checks that the fix, or any other change, did not create a new failure somewhere else. You usually want both.
  • Continuous integration (CI). Each change is merged often and verified by an automated build that includes tests, so a break is found while the change is still small and easy to revert. That is the core of Continuous Integration: a self-testing build, run on every push to the main line, with a broken build fixed immediately.
  • Snapshot and visual tests. A snapshot test stores a previously good output (text, HTML, or a screenshot) and fails when the new output differs. Playwright, for example, can compare screenshots against a reference image and will write a baseline on the first run. These tests are good at catching visual regressions, and easy to misuse: if you update the baseline without looking, you have just accepted the break.
  • git bisect. When you know a past revision was good and the current one is bad, Git can binary-search the history to find the first bad commit. The Git user manual describes this specifically as a way to find a regression. If you have a script that can say "good" or "bad," git bisect run can do the walk for you.
  • Feature flags (feature toggles). A flag lets you turn the new behavior off without a full redeploy. If a change causes a regression in production, you hide the new path and keep the old one running while you fix it. Flags are inventory: they have a carrying cost, and leftover flags become their own source of surprises.
  • Canary releases and rollback. A canary release rolls a new version out to a small subset of users or servers first, then watches for problems before everyone gets it. If something is wrong, the rollback is to route people back to the old version. This is how you limit the blast radius of a regression that tests did not catch.

What to do as a small founder

You do not need a large QA department to take regressions seriously.

  • Protect the paths that make or lose money: sign-up, login, checkout or billing, permissions, and the emails or webhooks that complete an order. Run those checks on every change, not only when you are touching that area.
  • When a regression gets through, add a test that would have caught it, then fix the code. Self-testing code treats the missing test as part of the bug, so the same break is harder to ship twice.
  • Put the suite in CI, even if it is short. A small, reliable set that runs on every push beats a large suite nobody trusts or nobody runs.
  • Keep a way back: a feature flag on a risky change, or a known-good deploy you can roll back to. Website maintenance also needs a clear owner, because a plugin, PHP, or hosting update is a change, and changes cause regressions.
  • Do not skip the suite because the change "shouldn't affect that." Shared code, shared config, and dependency updates are how a coupons ticket breaks guest checkout.
  • If you are vibe coding (prompting an AI to write a change and shipping with light review), treat the generated diff like any other change: run the same checks, and read the parts that touch auth, payments, or data.

Often confused with

  • Statistical regression (including linear regression). In statistics, regression is a way to model the relationship between variables, such as fitting a line to points. It is unrelated to this software meaning, even though the word is the same. If someone says "run a regression" in a data or finance context, they probably do not mean "re-run the test suite."
  • Refactoring. Refactoring is a controlled way to improve the design of existing code through small, behavior-preserving transformations. If observable behavior changes, the work was not a clean refactor; it introduced a regression (or an intentional behavior change that was not called out). Refactoring still needs regression tests, because that is how you know behavior did not move.
  • Rollback or revert. Those are ways to undo a change after a problem. They are a response, not the bug, and not the tests that would have caught it.
  • Flaky tests. A flaky test can pass or fail with the same code. That is not a regression in the product; it is an unreliable signal. The danger is practical: if the suite cries wolf, a real regression is easier to ignore.
  • Confirmation testing (re-testing a fix). As above, that checks the original failure is gone. It does not, by itself, prove you did not break something else.

Common mistakes

  • Only testing the new thing. The new feature can work perfectly and still take a working path down with it.
  • Calling every failure a flake. Some are. A test that used to pass and now fails consistently on the same commit is a regression until you prove otherwise.
  • Updating snapshots or screenshots to make CI green without inspecting the diff. You may be recording the bug as the new expected result.
  • No rollback path. If you cannot turn the change off or go back to the last good deploy, a production regression lasts as long as the fix takes to write and ship.
  • Assuming a refactor, a dependency bump, or a "config-only" change cannot break behavior. Those are common sources of regressions, especially across maintenance updates.
  • Finding a regression, fixing it, and not adding a test. The same hole stays open for the next change.
  • Letting the suite rot. Skipped tests, commented assertions, and baselines nobody reviews turn regression testing into theatre.