Test pyramid
A model showing that lower test levels (e.g. unit tests) should have many fast, isolated tests, with fewer slower tests at higher levels.
Syllabus chapters: 5
Sources: ISTQB® Certified Tester Foundation Level syllabus 4.0.1 and the official ISTQB® Glossary. Glossary content © International Software Testing Qualifications Board; source: glossary.istqb.org.
Related terms
Test pyramid in a practice question
Question 1
According to the test pyramid model, what happens as you move to a higher layer of the pyramid?
- Test granularity rises, test isolation rises, and execution time falls
- Test granularity falls, test isolation falls, and execution time rises
- Test granularity stays constant while only the degree of automation changes
- Test granularity falls, test isolation rises, and execution time falls
Show answer
- Test granularity rises, test isolation rises, and execution time fallsThis reverses all three: granularity and isolation fall, and execution time rises.
- Correct answer: Test granularity falls, test isolation falls, and execution time risesLower granularity, lower isolation, higher execution time.
- Test granularity stays constant while only the degree of automation changesThe model is precisely about granularity differing between the layers.
- Test granularity falls, test isolation rises, and execution time fallsIsolation falls rather than rises, and execution time rises rather than falls.
The higher the layer, the lower the test granularity, the lower the test isolation — that is, the degree of dependency on other elements of the system — and the higher the test execution time. Tests in the bottom layer are small, isolated and fast, so many are needed; the top layer holds complex end-to-end tests, of which few are needed.
Syllabus section 5.1.6
Question 2
According to the test pyramid model, what characterizes tests in the bottom layer?
- They are slow, end-to-end tests, and only a few are needed
- They are manual exploratory sessions guided by a charter
- They are small, isolated, fast, and usually many are needed
- They check the largest pieces of end-to-end functionality
Show answer
- They are slow, end-to-end tests, and only a few are neededSlow end-to-end tests of which few are needed describe the top layer, not the bottom.
- They are manual exploratory sessions guided by a charterThe test pyramid is about test granularity and automation, not exploratory charters.
- Correct answer: They are small, isolated, fast, and usually many are neededBottom-layer tests are small, isolated, fast, and usually many are needed.
- They check the largest pieces of end-to-end functionalityChecking the largest end-to-end pieces describes the top layer of the pyramid.
In the test pyramid, tests in the bottom layer are small, isolated, fast, and check a small piece of functionality, so many of them are usually needed. The top layer holds complex, high-level, end-to-end tests that are slower, so only a few are needed.
Syllabus section 5.1.6
Original PrepBench practice material, not official exam questions or exam dumps. PrepBench is independent and is not affiliated with or endorsed by ISTQB®.