Test Pyramid Shapes
Pyramid, trophy and honeycomb, and the system properties that justify each shape.
5 to work through
-
beginner Multiple choice
A team has 3200 unit tests that run in 90 seconds, 40 integration tests and 12 end-to-end tests. Over six months it shipped 19 defects to production and 14 of them were wiring faults - a wrong column name in a query, a header the downstream service rejected, a queue bound to the wrong exchange. Which change to the suite's shape actually addresses that?
3 min answer -
beginner Multiple choice
A team's pull-request suite has grown from 4 minutes to 26 minutes over a year, because every bug fix added a test and nothing was ever removed. No one has ever proposed deleting a test. What has the team given up, and which policy fixes it?
2 min answer -
beginner
Two tests exercise the same line of code. One starts the process and drives the HTTP API; the other calls the function directly. Once you look at the failure signal rather than the code covered, what actually distinguishes them?
2 min answer -
intermediate
A team is told its test suite should be a pyramid. When is that shape wrong?
2 min answer -
intermediate
A team's test distribution is an inverted pyramid — many end-to-end tests, few unit tests. What does that cost, and what causes it?
2 min answer
3 terms in this topic
Diagnostic Radius
The number of distinct causes consistent with a test's failure - the property that actually separates the layers of a test suite and decides what a r…
patternTest Pyramid
The heuristic that a suite should hold many fast isolated tests, fewer integrated ones, and very few full end-to-end tests.
conceptTesting Trophy
A distribution weighted towards integration tests rather than unit tests, appropriate where most of the risk lives at boundaries rather than in logic.
Neighbouring topics
Testing & Quality Architecture
General material on designing a testing strategy as an architectural concern.
Test Architecture Strategy
Choosing what to verify where, given the failure modes that actually occur.
Integration Test Boundaries
What sits inside a test's boundary, what is faked, and the confidence that follows.
Contract Testing at Scale
Keeping dozens of services compatible without an environment that runs all of them.
Consumer-Driven Contracts
Consumers declaring what they rely on, and providers verifying against those declarations.
Test Data Management
Realistic data without copying production personal data into a weaker environment.
Synthetic Data
Generating data with the shape and edge cases of the real thing, and where it misleads.
Environment Parity
The differences between staging and production that decide which bugs survive to release.
Service Virtualisation
Standing in for a dependency you cannot call, and keeping the stand-in honest.
End-to-End Test Economics
Why broad end-to-end suites get slow, flaky and abandoned, and what to keep.
Non-Functional Test Strategy
Testing availability, latency, security and recovery rather than only behaviour.
Performance Test Design
Workload models, warm-up, think time, and the distribution the average hides.
Chaos as a Test
Fault injection with a hypothesis, a blast radius and an abort condition.
Security Testing in the Pipeline
SAST, DAST, dependency and secret scanning, and what to do with the findings.
Accessibility Testing
Automated checks, their ceiling, and the manual testing that has to sit above it.
Mutation Testing
Measuring whether tests would actually notice a defect, not just cover a line.
Flaky Test Management
Quarantine, detection, and the trust a suite loses once red stops meaning broken.
Testing in Production
Synthetic transactions, dark launches and shadow traffic, done deliberately and safely.
Quality Gates
Thresholds that block a release, who may override them, and how they decay.