Regression Testing
Re-testing software after changes to ensure existing functionality still works correctly.
Full definition
Regression testing verifies that recent code changes haven't broken existing functionality. When developers fix a bug or add a feature, they might unintentionally introduce new problems — regression testing catches these.
Approaches to regression testing:
- Full regression: Run all tests — thorough but time-consuming
- Selective regression: Run tests related to changed areas
- Priority-based: Run critical tests first, expand if time allows
- Risk-based: Focus on areas most likely to be affected by changes
Regression testing is the #1 candidate for automation. Running the same tests repeatedly on every build is exactly what machines excel at. Teams typically maintain an automated regression suite that runs in CI/CD on every commit.
In practice, a regression test suite grows over time — every bug fix should add a regression test to ensure that specific bug never returns.
Examples
- 1.After fixing the login bug, running all authentication tests
- 2.After adding a new payment method, testing existing payment flows
Interview tip
Be ready to explain how you'd select test cases for regression: risk-based, change-impact analysis, or critical path coverage.