The Screenplay pattern structures automated tests around actors pursuing goals through an application. It can be used beyond UI automation. section 15.8.2
The model names five parts of an actor’s test interactions:
- Actors represent users or agents with goals. section 15.8.2
- Abilities are the functions available to an actor in a given context. section 15.8.2
- Tasks are higher-level business actions that help achieve goals. section 15.8.2
- Interactions are lower-level activities used to complete tasks. section 15.8.2
- Questions query system state so tests can make assertions. section 15.8.2
In BDD automation, scenario steps and their definitions resemble tasks; driver methods and test actions resemble interactions or questions. The pattern also offers a framework and terminology for thinking about code layering. section 15.8.2 section 15.9
Figure 15.9 The Screenplay pattern concepts are actors, abilities, tasks, interactions, and questions

A diagram summarizes the relationships among the five concepts. section 15.8.2

