Test Pyramid
Question
What is the test pyramid?
Hint
The pyramid optimizes for fast, reliable feedback.
Explanation
The test pyramid is a model for test suite composition: many fast unit tests at the base (70-80%), fewer integration tests in the middle (10-20%), and few slow E2E tests at the top (5-10%). The pyramid shape emphasizes fast feedback — most tests run in milliseconds. Inverting the pyramid (many E2E, few unit) leads to slow, brittle suites. Modern variations: testing trophy (more integration), testing diamond. The key principle: prefer fast, isolated tests. Use E2E sparingly for critical paths only. Adjust the ratio based on application type.
Related Resources
Related Lessons
- Test Pyramid
Learn pyramid.
Look up unfamiliar terms
A beginner-friendly glossary explains jargon in plain English — variables, functions, DOM, Promise, and more.
Decode error messages
Plain-English explanations of common errors — what they mean, why they happen, and how to fix them.
Build real projects
Apply what you learned by building guided projects with starter code and solutions.