====== The testing pyramide ====== [[https://martinfowler.com/articles/practical-test-pyramid.html|Source]] The [[software_testing|testing]] pyramide is a conceptual model that shows how to correctly distribute [[unit_test|unit]], [[integration_test|integration]] and [[end_to_end_test|end-to-end]] tests. {{ https://ctf-cci-com.imgix.net/5yK8Y4Xyw9UrFKrwofhpRY/93abeed26295d8be191b53da9bf62ca5/article-image-2.png?ixlib=rb-3.2.1&w=2000&auto=format&fit=max&q=60:article-image-2_png.png?direct&400|}} ==== Main takeaways ==== - The more high-level you get, less tests you should have. - Write tests with different granularity. ==== Benefits ==== - Following the model helps finding mistakes on low levels. - Saves money. - Ensures a balance between speed of feedback and complete verification. ==== Typical mistakes ==== * ice cream cone (reversed pyramid) * high-level tests repeat low-level ones. * isolation break: unit tests access the database or network and become integration testing.