Skip to content

The regression test pyramid

Most regressions are caught by unit tests, most failures are caught by integration tests; end-to-end suites are expensive and catch the residue.

Level

Speed

Coverage

Detects

Unit test

Milliseconds

One function

Local logic regressions

Integration test

Seconds

Two or more modules

Wiring regressions

Contract test

Seconds

One interface

API contract regressions

End-to-end test

Minutes

Whole system

User-flow regressions

Canary in production

Minutes

Real traffic

Behavioural regressions at scale