Skip to main content

Regression Testing

In Turkish
Regresyon Testi
Updated 2 min read

Share this page

Send the link, quote the definition with a link back, or show it as a card on your own site.

https://softwaredictionary.org/terms/regression-testing

In short

Regression testing is the practice of re-running existing tests after a code change to make sure that features which used to work have not broken.

What is regression testing?

Regression testing checks that new changes haven't broken old behavior. A regression is a bug in something that previously worked, such as a login page that fails after an unrelated update to the checkout code. Regression testing means running the existing tests again after every change to catch these problems early.

In practice, the regression suite is simply your collection of automated unit, integration, and end-to-end tests, run by a CI/CD pipeline on every commit or pull request. When a bug is found and fixed, developers add a test that reproduces it, so the same bug can't quietly come back. Large projects sometimes run a fast subset on every commit and the full suite nightly.

An analogy is a pilot's pre-flight checklist: even if only one part of the plane was repaired, the whole checklist is run again, because a fix in one place can affect another. Regression testing matters most in large, long-lived codebases, during refactoring, and when upgrading dependencies.

Regression testing is not a separate kind of test like a unit test; it describes a purpose. Any test becomes a regression test when you run it again to protect existing behavior. It is also different from testing a new feature, which checks behavior that didn't exist before.

Key takeaways

  • A regression is a bug in something that used to work.
  • Regression testing re-runs existing tests after every change.
  • Automated test suites in CI/CD make regression testing cheap and constant.
  • Every fixed bug should get a test that prevents it from returning.

Example

Adding a regression test after fixing a bugpython
# Bug report: parse_price("1,299.00") crashed because of the comma.
def parse_price(text):
    return float(text.replace(",", ""))

# Regression test: reproduces the old bug so it can never quietly return.
def test_parse_price_with_thousands_separator():
    assert parse_price("1,299.00") == 1299.0

Readers ask

What is the difference between regression testing and retesting?

Retesting checks that a specific bug fix actually works. Regression testing checks that the fix, or any other change, didn't break other features that were already working.

Should regression testing be automated?

Yes, wherever possible. Repeating the same checks by hand after every change is slow and error-prone, while an automated suite in a CI/CD pipeline can run on every commit in minutes.

See also

Spotted a mistake or something missing on this page?Suggest an edit

Read a random page
Open today's review
Switch to the dark theme
Read this page in Türkçe

More

Settings