chapter eighteen
18 Dress rehearsal patterns for building confidence
This chapter covers
- The challenges of testing an application that uses external services
- The benefits of resetting the database before a scenario runs, rather than after it finishes
- Techniques for ensuring that every scenario starts with the database in the same state
- Optimizations that allow for fast feedback without compromising the reliable repeatability of automated tests
- Useful approaches when tests rely on external datasets that are not owned by the team
The patterns described in this chapter are essential when integration testing scenarios that depend on services, such as databases or payment gateways. While developers are encouraged to develop using stubs to get the fast feedback they need, we must also continuously run the scenarios as integration tests to build confidence that there won’t be significant issues during a release.
Definition
Integration testing – the practice of testing various modules of the system under development as a group to ensure that together they behave as expected.