Test Pyramid
ELI5 — The Vibe Check
The Test Pyramid is a strategy for how many of each test type to have. Many fast unit tests at the bottom (the base), fewer integration tests in the middle, and just a handful of slow E2E tests at the top. Like a pyramid — wide base, narrow top. Invert it and you have a slow, expensive disaster.
Real Talk
The Test Pyramid (coined by Mike Cohn) recommends having many unit tests, fewer integration tests, and even fewer end-to-end tests. Unit tests are fast and cheap; E2E tests are slow and expensive. An inverted pyramid (mostly E2E) leads to slow, brittle test suites.
When You'll Hear This
"Our test suite is an inverted pyramid — too many E2E tests and almost no unit tests." / "Follow the test pyramid: write 10 unit tests for every integration test."
Related Terms
CI Testing
CI Testing is running all your tests automatically every time someone pushes code.
End-to-End Test (E2E)
An end-to-end test is like hiring a robot to be a user.
Integration Test
If a unit test checks one LEGO brick, an integration test checks that two bricks actually snap together correctly.
Smoke Test
A smoke test is the most basic sanity check: does the app even start? Does it not immediately crash?
Unit Test
A unit test is like checking that one single LEGO brick isn't broken before you use it in your big castle.