Skip to content

OrderNot attempted

The testing pyramid

Order the layers of the testing pyramid from the BASE (most tests) to the TOP (fewest).

Drag the rows, or use the arrows, to put them in order from first to last.

  1. End-to-end tests: critical user journeys in a real browser
  2. Integration tests: components and services working together
  3. Unit tests: pure logic and isolated components
Show answer & explanation

Correct order:

  1. Unit tests: pure logic and isolated components
  2. Integration tests: components and services working together
  3. End-to-end tests: critical user journeys in a real browser

Lower layers are fast, cheap and precise; higher layers are slow and flaky but closest to reality. Many teams use the "testing trophy" instead, weighting integration tests most, since that's where frontend bugs live.