chapter fifteen

15 Mise-en-scène patterns for layering the automation codebase

 

This chapter covers

  • Test automation through outer interfaces of the application
  • Options for running the application under test
  • Separating the code into test, automation, and infrastructure layers
  • Techniques for enabling step definition reuse and simplification
  • Facilitating fast feedback despite the presence of problematic dependencies
  • An overview of some relevant patterns that are widely used in the industry

The patterns described in this chapter allow us to cleanly and maintainably set the stage for our scenario automation. They provide all the tools needed to deliver on our automation strategy decisions. Mise-en-scène is the term used in film and the theatre that encompasses the stage design and the arrangement of actors. That is what these patterns enable:

15.1 Automating though an outer interface

15.2 Test Driver pattern: separating automation logic

15.3 Infrastructure Layer pattern: separate infrastructure code

15.4 Test Action pattern: simplified management of test actions

15.5 Attempt Action pattern: when failure is allowed

15.6 Polymorphic Driver pattern: reuse driver interfaces

15.7 Stub Dependency pattern: stubbing an external service

15.8 Related patterns

15.8.1 Hexagonal Architecture pattern

15.8.2 Screenplay pattern

15.9 Summary