Published in



Choosing Tests for Infrastructure

An excerpt from Infrastructure as Code, Patterns and Practices by Rosemary Wang

Figure 1. Based on the test pyramid, you should have more unit tests than end-to-end tests because it costs less in terms of time, money, and resources to run them.
  • Static analysis (unit and contract tests) and integration tests for modules using the factory, builder, and prototype pattern
  • Unit tests and dynamic analysis (integration and end-to-end) for configurations using a general composite or singleton pattern applied to environments
Figure 2. Your testing approach should differ depending on whether you write a module or environment configuration.



Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Manning Publications

Follow Manning Publications on Medium for free content and exclusive discounts.