External infrastructure includes production dependencies such as databases, external services, file systems, and system time. Scenario automation can use these real dependencies or synthetic test implementations called stubs. section 12.5
Choose case by case, prioritizing fast, robust feedback:
- Use real infrastructure when it provides fast, robust feedback; an in-memory database may be an option. section 12.5
- Consider stubs when real infrastructure cannot provide fast, robust feedback. If scenarios use stubs, include other tests, such as contract tests, to check compatibility with the real service. section 12.5
- The same automated scenarios can be configured to run with either stubs or real implementations. section 12.5
