mediumConceptDesignMidSeniorLead
What is the test pyramid, and is it still the right model for your system?
4 min readUpdated 2026-08-15
Answer
Short answer
Buy most of your confidence from fast isolated tests and little from slow end-to-end ones, because cost and flakiness rise as you climb.It is a claim about where risk lives, so a system whose risk sits in integration - a thin service over a database - correctly has a different shape.
Was this answer helpful?
Likely follow-ups
- Your service is mostly persistence and HTTP glue. What does its test distribution look like?
- What makes an end-to-end test expensive beyond the minutes it takes to run?
- How do you get out of an ice-cream cone without a rewrite?
- Where do contract tests fit, and what do they let you delete?
Related questions
- How do you decide what to automate and what to leave manual?mediumAlso on test-strategy and test-pyramid6 min
- Your test suite takes fifty minutes and every merge waits for it. How do you fix that?mediumAlso on feedback-loops and flakiness5 min
- Where do you draw the line between a unit test and an integration test, and how do you keep a few thousand of them under ten minutes?hardAlso on test-strategy6 min
- Your consumer-driven contract test passes in CI, but production rejects a request because a supposedly optional field is missing. What did the contract testing actually miss?hardAlso on integration-testing4 min