Regression testing: a practical guide and best practices
What regression testing is, how it differs from retesting and smoke testing, what to include in a regression suite and how to automate it well.
Regression testing re-runs existing tests after a change to make sure that features which worked before still work. Every bug fix, new feature or dependency update can break something elsewhere; regression testing catches it before users do.
Regression testing vs retesting vs smoke testing
| Goal | When | |
|---|---|---|
| Regression testing | Nothing that worked before is broken | After any change, before release |
| Retesting | A specific bug is really fixed | After that fix |
| Smoke testing | The build is stable enough to test | First, on every new build |
| Sanity testing | A specific change works at a basic level | After a small change |
Regression testing vs retesting: retesting checks one thing, the bug that was just fixed, by running the test that failed again. Regression testing checks everything around it, to make sure the fix did not break something else. After a bug fix you normally do both: retest first, then run the regression suite. For the other two rows of the table, see smoke testing vs sanity testing.
What to put in a regression suite
- Business-critical flows: sign-up, sign-in, search, checkout, payments.
- Features that broke before (each fixed bug should leave a test behind).
- Integrations with other systems and APIs.
- Areas touched by the current change and their neighbors.
Best practices
- 1Prioritize. Tag cases as critical, high and normal; run critical ones on every change and the full suite before release.
- 2Automate the repeatable part. Regression tests run again and again, so they pay back automation fastest.
- 3Keep tests independent with their own data, so order and parallel runs do not matter.
- 4Fix or quarantine flaky tests quickly, or people stop trusting the suite. See flaky tests.
- 5Prune. Remove duplicate or obsolete cases; a smaller reliable suite beats a large ignored one.
- 6Report trends, not only the latest run.
Automating regression testing
You can automate with a framework such as Selenium, Playwright or Cypress (see our framework comparison), or with an AI-powered platform that plans, runs and analyzes tests for you.
Tebugging runs tests automatically with real-time monitoring and instant feedback, and its AI-powered analysis helps identify patterns and predict failures across runs.
Frequently asked questions
What is the difference between regression testing and retesting?+
Retesting confirms that one specific bug is fixed by re-running the test that failed. Regression testing re-runs a wider set of existing tests to confirm that the change did not break anything else.
How often should regression tests run?+
Critical regression tests should run on every change or at least daily; the full suite before every release.
Should all regression testing be automated?+
Most of it should, because the same checks repeat. Keep manual time for new features and exploratory testing.
Keep reading
New to a term? See the QA and AI testing glossary.
Plan, run and analyze your web tests with AI.
Start on the free plan. No credit card required.
Start Testing Free