The Test Pyramid is a graphical model illustrating the relationship between different levels of testing in terms of quantity and focus. It emphasises having more tests at lower levels (unit tests) than at higher levels (integration or end-to-end tests).
Structure of the Test Pyramid:
- Unit Tests (Base): The largest number; focused on individual components or functions.
- Integration Tests (Middle): Fewer than unit tests; focused on interactions between components.
- End-to-End Tests (Top): The smallest number; focused on complete workflows from start to finish.
The test pyramid encourages teams to prioritise unit tests for efficiency while still ensuring comprehensive coverage through integration and end-to-end tests.
