← Concepts

阅读中文版本

Regression Suite

A regression suite is the set of tests rerun after changes to prove existing behavior still works, curated and maintained to stay fast and trustworthy.

testing

Definition

A regression suite is a curated collection of automated and manual checks executed repeatedly to detect unintended changes in previously working behavior.

Context and scope

Run on pull requests, before deployment, and after dependency upgrades, data migrations, or configuration changes.

Common misconceptions

  • A regression suite should contain every test ever written
  • A passing regression run proves the change under test is correct
  • A slow suite can be solved by running it less often

Anti-patterns

  • Appending every new test forever and never retiring obsolete ones
  • Quarantining flaky tests indefinitely instead of repairing them
  • Duplicating low-level rule checks at the UI layer

Related concepts

Related examples

Authoritative source

https://glossary.istqb.org/en_US/term/regression-testing

Purpose

A regression suite answers one question after a change: did anything that used to work stop working? It is not a specification of all desirable behavior, and it is not a substitute for testing the new change itself. Its value comes from repetition across releases. The suite is an asset that either compounds confidence or accumulates noise.

What belongs

Include checks for behavior that is stable, important, and likely to break. Business rules, API shapes, authorization boundaries, pricing calculations, and critical user journeys belong. One-off investigations do not. Prefer the lowest layer that can catch the defect: a unit test for a parsing rule, an integration test for a transaction, a browser test only where the browser is the risk. Compared to a large end-to-end suite, a layered suite pinpoints failures faster.

Selection and speed

Full suites become slow, so many teams maintain tiers: a fast subset on every commit, a broader run before merge, and the full suite nightly. Selection must stay risk-aware; dropping tests only because they are slow quietly removes protection. Measure duration and failure history, then optimize or replace expensive tests instead of abandoning them.

Maintenance

Delete tests for removed features. Update expectations when behavior changes intentionally, and record why. Fix flaky tests promptly: a suite that fails at random trains people to ignore red builds. Track pass rate and time to green as health metrics, not just coverage.

Trust

For example, if a team reruns failed jobs until they pass, the suite still reports success while hiding real races. A regression suite is only as useful as the team’s response to its failures. Treat every red run as a signal until proven otherwise.