The Screenplay Pattern Better Interactions for Better Automation - CTM Online

The Screenplay Pattern Better Interactions for Better Automation - CTM Online

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:

  • I’ll cover problems with traditional ways of automating interactions.
  • I’ll explain why the Screenplay Pattern is a better way.
  • 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!

LINKS
Boa Constrictor doc site: https://q2ebanking.github.io/boa-constrictor/
Boa Constrictor repository: https://github.com/q2ebanking/boa-constrictor

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
LinkedIn: https://www.linkedin.com/in/andrew-leland-knight/
Twitter: @AutomationPanda