20 Staging patterns for adapting test execution
This chapter covers
- The broad scope of configuration in the context of test execution
- Techniques for setting and overriding configuration values
- Encapsulating the mechanisms by which configuration values are determined
- Using configuration to modify automation code behavior
- Incorporating configurable elements into scenario step text
- Testing deployments that integrate with a variety of external resources
Choosing between stub or production-like external resources when testing the system is only one dimension of the choices that we need to make. Systems typically support integration with a wide selection of external services—various relational databases or web browsers, for example. Additionally, many systems are designed for customized deployments, whether localized for the different regions that a single business operates in or white-labelled for use by many different businesses. The patterns described in this chapter facilitate testing the many configurations that the system supports.
It is no different in the theatre. Some stages are wide, some narrow. The director may choose to set Shakespeare in a modern setting, or Beckett in ancient Greece. The playwright writing a script has no knowledge of the physical venue or the cultural context that their play will be staged in. These Staging patterns support the same level of configurability when executing your system’s scenarios: