If you’ve ever worked in testing or QA you’ve probably seen something like this.
![](https://static.wixstatic.com/media/7a4f4d_c467718df89d4d60b83f0ebcfb81178c~mv2.jpg/v1/fill/w_980,h_898,al_c,q_85,usm_0.66_1.00_0.01,enc_auto/7a4f4d_c467718df89d4d60b83f0ebcfb81178c~mv2.jpg)
(credit to Ministry of Testing)
And by now you’re probably thinking ‘Surely not another testing pyramid blog’.
Stay with me folks..
Hopefully, this isn't just another Testing pyramid blog. This blog is about changing your perspective.
Infact, the pyramid you’re familiar with isn't a pyramid at all - its just a triangle. This blog is about looking at the pyramid in three dimensions and reframing its context.
So, this is a pyramid, right?
![](https://static.wixstatic.com/media/7a4f4d_a03b66a5454a4e07a157b926e5b17178~mv2.jpg/v1/fill/w_980,h_397,al_c,q_85,usm_0.66_1.00_0.01,enc_auto/7a4f4d_a03b66a5454a4e07a157b926e5b17178~mv2.jpg)
It’s what’s known as a ‘right square pyramid’ because it’s net consists of 4 triangles, a square and its apex is directly above the centroid of its base.
Here’s the bit where i blow your mind. I think the face of the testing pyramid you’re familiar with is actually the base of a tetrahedral pyramid. Or in layman’s terms; the kind made of 4 triangles.
If i sketch that out it looks more like this:
![](https://static.wixstatic.com/media/7a4f4d_39aa99a8fd054b569adf0befc219de7f~mv2.png/v1/fill/w_389,h_224,al_c,q_85,enc_auto/7a4f4d_39aa99a8fd054b569adf0befc219de7f~mv2.png)
So am i just being pedantic about geometry or is there some real value in reimagining this?
Well, i think so. By reimagining the pyramid in this way we’re building on the pyramid analogy. There is an additional dimension to consider.
![](https://static.wixstatic.com/media/7a4f4d_361ffe8991b8418394f15c0c7ffc4b7b~mv2.png/v1/fill/w_407,h_252,al_c,q_85,enc_auto/7a4f4d_361ffe8991b8418394f15c0c7ffc4b7b~mv2.png)
In two dimensions most (here-forth known as) ‘testing triangles’ tells us that our unit tests should be more numerous than our API/ service layer tests and our automated UI tests less numerous still. Whilst i think this is still a generally sound model (i’ll save my real criticism of it for another blog) our new imagining of the pyramid gives us a little bit more…
![](https://static.wixstatic.com/media/7a4f4d_9cce145f6afc4660b1633009071ad0c4~mv2.png/v1/fill/w_545,h_380,al_c,q_85,enc_auto/7a4f4d_9cce145f6afc4660b1633009071ad0c4~mv2.png)
Having this additional context to work with the testing pyramid analogy now tells us;
There’s a point in time where no tests exist
Number of tests increase over time
At any given point in time we should have appropriate distribution of tests
It would be great to hear from the community on this - so feel free to comment and we can talk about it.
![](https://static.wixstatic.com/media/7a4f4d_8477e5790bd6432e92bbf31f488d70dc~mv2.gif)
Thanks for reading!
James
Comentarios