Regression testing
Regression testing is the re-running of existing tests after a change to a system, to detect whether the change has broken functions that worked before. It looks at the parts of the software that were not meant to change, as opposed to testing the change itself.
What it is
Regression testing is the repeat of earlier tests after a system has been changed, to confirm that the functions that worked before still work. A regression is a defect that appears in an unchanged area because of a change somewhere else. The testing glossary of the International Software Testing Qualifications Board describes it as change-related testing that looks for defects introduced or uncovered in unchanged areas of the software.
A change can be a bug fix, an enhancement, a configuration setting or an update to the platform underneath. Each of these can disturb behaviour that nobody meant to touch.
The parts of a regression approach are:
- Regression pack: the stored set of test cases, with expected results, that is re-run after changes.
- Selection: the choice of which tests to run, from the full pack to a subset that covers the changed area and its neighbours.
- Automation: scripts that run the pack without manual steps and compare actual results with expected ones.
- Baseline: the recorded outputs of the last accepted version, used as the expected result.
Why it matters
Every release carries a risk that a fix in one place breaks another. Without a stored pack, each release depends on someone remembering what used to work.
Frequent releases multiply this risk, and manual checking cannot keep pace. An automated pack gives a repeatable answer after every change. In finance, outputs such as reports and payment files must stay stable between versions unless a change is intended, so an unexpected difference is a defect or an unrecorded change.
Worked example
Illustrative numbers. A reporting application has a pack of 200 test cases covering calculations, validations and file layouts. A change adds an extra field to one report.
- The tester runs the 200 cases against the changed version and compares the outputs with the baseline from the last accepted version.
- 196 cases match exactly.
- 4 cases differ. Two differences come from the added field and are intended, so the baseline is updated for those.
- The other 2 differences affect a subtotal in an unrelated report. The change moved a rounding step, and this is a regression.
- The release is held until the rounding is corrected and the pack is re-run with 200 matches or documented intended differences.
How to read it
A passing pack shows that the tested behaviour is unchanged. It says nothing about behaviour the pack does not cover. A failing case needs a decision: defect, or intended change that requires an updated baseline.
Who uses it
- Business analysts specify the expected behaviour that the pack protects and judge whether a difference is intended.
- Regulatory reporting analysts compare report outputs before and after a change against the stored baseline.
- Quantitative developers write and maintain automated tests that run with each code change.
- Product owners decide whether a release may proceed when the pack shows differences.
- Project managers include regression runs in the plan and track their results before release.
Common confusions
- Regression testing is not testing an added feature. It re-checks old behaviour. The added feature has its own tests, which join the pack once accepted.
- It is not the same as user acceptance testing. Acceptance tests confirm that the business accepts the change, while regression tests confirm that nothing else broke.
- Running the full pack is not always required. A selected subset that covers the changed area is a recognised approach, though it carries the risk of missing a side effect.
- A pack that is never updated loses value. Tests that no longer match the business rules produce false failures or false comfort.