There are different types of testing you may encounter when designing or implementing a software system. Each of the classes serves a slightly different purpose. They can be categorized as follows:
- Unit testing: Code
- Integration testing: Design
- System testing: Requirements
- Acceptance testing (end-to-end or E2E): Client needs
This distinction is arbitrary and you may often see other layers of the pyramid, as follows:
- Unit testing
- Service testing
- UI testing (end-to-end or E2E)
Here, unit testing refers to the same layer as in the previous example. Service testing refers to a combination of integration testing and system testing. On the other hand, UI testing refers to acceptance testing. The following diagram shows the testing pyramid:
Figure 8.1 – Testing pyramid
It's worth noting that unit tests are not only the cheapest to build but that they also execute pretty quickly and can often run in parallel. This means they make for a great continuous...