liveBook · Manning

External infrastructure

As explained in Effective Behavior-Driven Development

Production dependencies outside an application, such as databases, external services, file systems, or system time.

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

How Effective Behavior-Driven Development covers it

How deep it goes
Compares real infrastructure with stubs and weighs trade-offs, leaving the choice case-specific.
Examples
Names databases, external services, file systems, system time, and an in-memory database.
What you can do after
Evaluate infrastructure choices by feedback speed and robustness, then account for contract tests when using stubs.
How it connects
Links scenario automation with stubs and contract testing.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Effective Behavior-Driven Development. The section links point to the parts of the book it draws on.