Skip to content

How it works

Each layer catches what the layer below cannot: unit catches logic, integration catches contracts, E2E catches user flows. Removing a layer shifts its defects up or down, and neither direction is free.

graph TD
  E[E2E<br/>5-10% · minutes · full user flows] --> I[Integration<br/>15-20% · hundreds of ms · contract boundaries]
  I --> U[Unit<br/>70-80% · milliseconds · isolated logic]
  style U fill:#E8F5E9
  style I fill:#FFF3E0
  style E fill:#FFEBEE

Three properties of the pyramid matter in practice. Cost scales with height: every layer up is roughly 10× slower and 10× more expensive per assertion, so the lower layers must do most of the work. Confidence scales with height: only the top layer proves that a user can complete a flow, which is why the top layer cannot be eliminated. Feedback latency scales with height: a failing unit test localises to a function in seconds; a failing E2E localises to a user flow in 30-60 minutes of debugging.