Glossary · IT & systems
Test pyramid
The test pyramid is a rule of thumb for testing software: many small, fast and automated tests at the bottom, and fewer and fewer large, slow tests the higher you go.
The test pyramid is a way of thinking about where your software is checked for errors. At the bottom are many small tests that each check a small piece of code. They run automatically and in seconds, so they run again with every change. Above them are fewer but larger tests that check whether components work well together. At the top are a handful of tests that run through the whole application the way a user would. They are valuable, but slow and more prone to failure, so you deliberately keep few of them.
Why the shape of a pyramid
The shape says it all: broad and solid at the bottom, narrow at the top. The lower down an error is found, the faster and cheaper it is to put right. That is the same reasoning as behind Boehm's lawBoehm's law says that an error becomes more expensive the later you discover and fix it, and that the cost rises exponentially.. If you turn the pyramid upside down and mostly test at the top, by clicking through everything by hand just before a release, you get a wobbly shape that is mockingly called the ice cream cone. Such a setup is slow, breaks easily and misses precisely the errors you did not happen to click on.
What it means for you
You do not write these tests yourself, but you can ask your software partner how they test. Does it happen automatically with every change, or only by hand at the end? The answer tells you a lot about how smoothly the next change will go. A healthy test pyramid is one of the reasons why some teams release new things without fuss year after year, while for others every change feels like a gamble.


