Regression Testing: Strategy and Automation
Regression testing verifies that previously working functionality still works after code changes — ensuring that new features or fixes haven't broken existing behaviour. It is the most important justification for maintaining a comprehensive automated test suite: the test suite runs automatically on every change and catches regressions before they reach users.
The Regression Risk
Every code change introduces regression risk — the risk that something previously working has been broken. Manual regression testing of a significant application before each release takes days or weeks and is still prone to human error. Automated regression suites run in minutes or hours and catch regressions reliably.
Building an Effective Regression Suite
- Prioritise by risk: Not all functionality is equally important. Critical user journeys (checkout, authentication, core features) must be covered. Less critical paths can have lighter coverage.
- Test at the right level: Unit tests for logic, integration tests for service behaviour, E2E for critical journeys. Over-reliance on slow E2E tests creates a suite that takes too long to run.
- Maintain the suite: Tests that don't pass when run against a good build aren't tests — they're noise. Broken tests must be fixed immediately.
Smoke Testing vs Full Regression
A smoke test suite is a fast subset of critical checks that run on every deployment — verifying the application starts, login works, and critical paths are functional. A full regression suite runs less frequently. Both serve different purposes: smoke tests catch catastrophic failures immediately; full regression catches subtle regressions.