Categories
Ctm online

The Screenplay Pattern: Better Interactions for Better Automation

“The Screenplay Pattern: Better Interactions for Better Automation”

Andrew Knight - The Automation Panda

Automating interactions for tests is hard. For the past decade, the primary way to automate web UI interactions has been the Page Object Model. Unfortunately, page objects do not scale well because, by design, they allow lots of code duplication and unsafe activity. The Screenplay Pattern is a much better pattern for handling interactions. In Screenplay, Actors use Abilities to perform Interactions.

In this talk, I’ll back up that claim in three parts:

  1. I’ll cover problems with traditional ways of automating interactions.
  2. I’ll explain why the Screenplay Pattern is a better way.
  3. I’ll show how to use the Screenplay Pattern with a C# library named Boa Constrictor.

We will implement both a Web UI search engine test and a REST API web service test in C# with Boa Constrictor to demonstrate how to write readable, reliable tests using Screenplay calls. By the end of this talk, you’ll be able to start using the Screenplay Pattern for your own tests!

Bio

Andrew Knight is the Automation Panda and also a Developer Advocate at Applitools. He strives to help others in solving problems in software development, testing, and quality. Over the past decade, he has designed and built robust test automation projects from the ground up that can run thousands of tests continuously. He is the author of the upcoming book “The Way To Test Software” from Manning Publications, and he is also the lead developer for Boa Constrictor, the .NET Screenplay Pattern. Read his tech blog at AutomationPanda.com, and follow him on Twitter at @AutomationPanda.

Contact