The concept of a test pyramid is not new, but as Ian Johnson points out in his article on dev.to, most test pyramids are aspirational. People draw the triangle, point at "many unit tests, fewer integration tests, and even fewer end-to-end tests" but often fail to deliver. The idea behind the test pyramid is to have a solid foundation of unit tests, a smaller number of integration tests, and an even smaller number of end-to-end tests. This approach is meant to provide confidence in the overall quality of the software. According to Johnson, a test pyramid that earns its confidence is one that is based on actual testing needs, rather than just following a theoretical model.
Understanding the Test Pyramid
The test pyramid is a concept that has been around for a while, and it is based on the idea that different types of tests provide different levels of confidence. Unit tests provide the most granular level of confidence, while end-to-end tests provide a higher level of confidence but are more complex and time-consuming to set up. Integration tests fall somewhere in between. Johnson argues that the key to a successful test pyramid is to understand the actual testing needs of the software, rather than just following a theoretical model.
Creating a Test Pyramid that Earns Confidence
To create a test pyramid that earns its confidence, Johnson suggests that developers should focus on creating a solid foundation of unit tests, and then use integration tests and end-to-end tests to fill in the gaps. This approach requires a deep understanding of the software and its testing needs, as well as a willingness to adapt and adjust the test pyramid as needed.
What this means for QA engineers
For QA engineers, the concept of a test pyramid that earns its confidence means that they need to be flexible and adaptable in their testing approach. Rather than following a rigid model, they need to be able to adjust their testing strategy based on the actual needs of the software. This requires a deep understanding of the software, as well as the ability to communicate effectively with developers and other stakeholders. By following this approach, QA engineers can help create a test pyramid that provides real confidence in the quality of the software, as discussed in the original article on dev.to by Ian Johnson.