Screenplay pattern
The Screenplay pattern is a test-automation design pattern that organizes behavior around actors, their abilities, tasks, interactions, and questions about system state.
BDD in Action, Second Edition
Screenplay is an actor-centric test-automation pattern that structures behavior around actors performing reusable tasks through abilities and interactions while answering questions about system state.
- How it is used
- Structures growing acceptance-test suites around actors’ goals while separating business-readable workflows from interface details.
- How deep it goes
- Works through actors, abilities, interaction objects, composed tasks, and assertions with code; defers detailed REST API treatment.
- Examples
- Uses flight searches, account registration and login, account-status checks, and browser-versus-REST user registration.
- What you can do after
- Apply it via Serenity BDD or Serenity/JS to compose reusable actor tasks and check outcomes across system interfaces.
Read how BDD in Action, Second Edition explains screenplay pattern →
Effective Behavior-Driven Development
The Screenplay pattern is a test-automation design pattern that models actors, abilities, tasks, and questions to express interactions with a system.
- How it is used
- Structures automated tests around actors pursuing goals, including tests that target more than a user interface.
- How deep it goes
- Defines five concepts and relates them to BDD automation, while deferring detailed treatment of the pattern.
- Examples
- Illustrates the five-part model with a concept diagram, without a worked scenario.
- What you can do after
- Understand the five concepts and how they map to BDD automation layers.
Read how Effective Behavior-Driven Development explains screenplay pattern →
What to know first
- actorAn actor is a person, system, process, or computational entity that performs actions or participates in interactions within a system.
- goalA goal is a desired outcome or state that guides actions and decisions or provides a basis for evaluating progress.
- page objectA page object is a test-automation pattern that represents a user-interface page and encapsulates its elements and interactions behind a programmatic interface.
Related concepts
- abilityhas part · An ability is a Screenplay capability that enables an actor to interact with a system or test environment through a particular mechanism.
- actorhas part · An actor is a person, system, process, or computational entity that performs actions or participates in interactions within a system.
- interactionhas part · An interaction is a low-level operation a Screenplay actor performs on a system through an interface.
- taskhas part · A Screenplay task is a reusable, higher-level action an actor performs to achieve a goal, often composed of interactions or other tasks.
- commanduses · A command is an instruction or representation of a requested operation that a system can execute, often with parameters and potentially changing state.
Questions about screenplay pattern
What is screenplay pattern?
The Screenplay pattern is a test-automation design pattern that organizes behavior around actors, their abilities, tasks, interactions, and questions about system state.
Which Manning books explain screenplay pattern?
BDD in Action, Second Edition and Effective Behavior-Driven Development.
What should I know before learning screenplay pattern?
Manning books that teach screenplay pattern usually introduce actor, goal and page object first.
What are the parts of screenplay pattern?
Screenplay pattern includes ability, actor, interaction and task.
These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.

