Bookmarks

Regression testing

A check that confirms that, after a change to a program or its environment (new features, fixes, refactoring), no new defects have appeared in the rest of the code.

Also: regression tests, regression

checked 18 Nov

All terms

Any code change can quietly affect what used to work: fixing one bug breaks a neighbouring function, a new library version changes the behaviour of the whole application. Regression testing repeats checks that have already passed after such changes, and it is the main reason test suites are automated.

What is checked and when

When it runsWhat is checked
After a bug fixthe bug itself and the scenarios around it: a fix often affects neighbouring behaviour
Before a releasethe key user scenarios that must work in every version
In CI on every commitan automated suite: unit and integration tests and critical end-to-end checks
After an environment changea new version of the database, a library, the browser or the operating system

Choosing the scope

Running the full test suite for every change is often too slow, so it is split into tiers: a fast smoke run on every commit, then an extended suite, and a full run overnight or before a release. For example, if 4,000 automated tests take 50 minutes to run in full, run the 400 fastest and most important checks (6 minutes) on every commit and leave the full run to the nightly pipeline.

Why the word “regression”

Here the word “regression” means a step backwards, a return to a worse state: the program worked, and after a change it got worse. The same scenarios are repeated from release to release, and that volume cannot be run by hand, so the regression suite is automated and run on every build.

The ISTQB CTFL v4.0.1 syllabus distinguishes regression testing from confirmation testing (called retesting in older editions): confirmation testing checks that the original defect has been fixed, while regression testing checks that a change, including an already confirmed fix, has caused no side effects, either in the same component or in others.

Sources

the term is written from these pages

Verified 18 Nov

Not to be confused with

what it is mixed up with and how it differs

  • smoke test

    A smoke test is a minimal check that the program works at all; a regression suite is broader and repeats previously passed scenarios in full.

In depth in the references

where the topic is covered in detail