Writing time: 1 hour.
TL;DR
You probably have seen testing pyramid as blog post or even worse, at paid testing conference. In this post I will explain why every testing pyramid that you have seen is wrong. I will give you real testing pyramid.
Proposed testing pyramids are wrong for three reasons:
- they only depict automatic checking
- they are triangles, not pyramids
- they only depict a few testing techniques
Geometry lesson.
Pyramid is 3D object while triangle is 2D object. Following picture shows pyramid in 2D perspective and a triangle.
This is pyramid with all possible sides:
Wait, what, we have four triangles and a rectangle!? So what you have seen at various blog post and paid conferences was a triangle. Moving on.
Automatic checking pyramid
This was presented as testing pyramid:
You probably got impression that testing is:
- automatic UI checking (aka selenium)
- automatic integration testing (aka rest api testing)
- unit automatic checking (aka this is hard and I will do with item #1 or item #2)
Wrong.
Demystified testing pyramid in 2D
So we have FIVE dimensions of testing. Wait, this rings a bell. Searching through BBST slides, yes, here it is, Heuristic Test Strategy Model has FIVE elements. I propose mapping of Heuristic Test Strategy Model [by James Bach] to pyramid:
And testing triangle just scratched part of test techniques. Note that I put test techniques as pyramid base. When you see a real pyramid, its base is hidden (unknown), just as the skilled testing usually is.
Disclaimer
Be noted, if I will see testing triangle as part of any future testing talk at te software testing conference that I will pay for, I will object, (in the most polite manner possible) live at the presentation, and to the conference organizers that allowed this picture to be part of their conference lineup. Please, do the same as me.
“The base of a pyramid can be trilateral, quadrilateral, or of any polygon shape… The square pyramid, with a square base and four triangular outer surfaces, is a common version.” https://en.wikipedia.org/wiki/Pyramid
That is correct! And for base polygon number of sides > 4, this gives even more testing dimensions. Egyptian pyramids are the most famous pyramids, so my mental model of pyramid was based on them. As testers, we should always be able to communicate our application model that is in our head.