Skip to content

The trade-off, quantified

Every E2E test is 20-50× more expensive to run than a unit test; the pyramid exists because someone measured it.

Metric

Unit

Integration

E2E

Runtime per test

5-50 ms

200-800 ms

5-60 seconds

Flakiness rate

<0.1%

0.5-2%

1-5%

Infrastructure cost per run

Negligible

Low

High

Debug time when failing

Seconds

Minutes

15-60 minutes

Business-critical coverage

None

Partial

Full

The flakiness numbers are the ones that kill teams. A suite with 5% E2E flakiness on 100 tests produces 5 false failures per run — the team spends an hour a day chasing ghosts, then stops trusting the suite, then stops fixing real failures. Google's own engineering book confirms the pattern: the team that owns the flaky test system at Google uses the same statistical machinery as spam detection to identify flaky tests because the signal-to-noise ratio is so bad [1].