liveBook · Manning

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.

How 2 Manning books explain it

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

Related concepts

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.