138: Is the Screenplay Pattern Better Than Page Objects with John Smart
with John Smart
author · the best-selling BDD in Action
About this episode
We had an interesting session this year at the Automation Guild Conference with John Ferguson Smart, creator of the Serenity framework on the Screenplay Pattern. It created a lot of interest and conversation among Guild attendees and speakers alike; so much so that someone in the group recommended that I create a separate podcast dedicated to the topic … so here it is!
Quotes & Insights from this Test Talk
- The essence of what we're talking about here is not just writing automated tests that check various aspects of a website or an application. When we start to do something like screenplay,
we're actually changing our perspective on automated tests. Rather than just writing tests that verify whether the application works after the fact, which is the more traditional way of writing automated tests, we're actually moving towards a more proactive approach, a more dynamic approach; we're actually using automated tests to help us focus on what is really important – to give feedback to the business, to give feedback to the team, to enable us, empower us, to deliver applications and new features much faster. It is very much in the line of behavior driven development of DevOps, of Lean Enterprise, and all of those good things. We're going to see
how screenplay helps you deliver on these promises. - In a nutshell, what is Serenity BDD? It's an open-source test library, with a very strong focus on, not so much test recording – although, obviously it does do test recording – it's very focused on requirements reporting. What I like to call feature coverage, or release readiness. How do you know whether your application is actually ready to go into production? How do you know what features you've delivered, and how well they're tested? This is something that is not immediately obvious in a typical test report. We'll see what this means later on, and what it looks like.
- Another big issue we find is reusability. There's a huge maintenance issue in code that's hard to reuse, or is not reusable at all. In Serenity BDD, what we do is we use reusable components; not at a technical level. We have page objects, but they're not the main focus. We take reusability to the next level up: we have reusable business components. So we compose tests using business concepts, not using technical concepts. That makes a huge difference in its ability to scale, to write tests that will stand the tests of time, that will bring people on board and get them up to speed quickly, and to write tests for very large applications.
- Screenplay uses the idea of actors, tasks, and goals to express tests in business terms, rather than in terms of interactions with the system. In screenplay, we describe tests in terms of an actor who has goals
Resources
Connect with John Smart
- Twitter:@wakaleo
- Blog: johnfergusonsmart
May I Ask You For a Favor?
Thanks again for listening to the show. If it has helped you in any way, shape or form, please share it using the social media buttons you see on the page.
Additionally, reviews for the podcast on iTunes are extremely helpful and greatly appreciated! They do matter in the rankings of the show and I read each and every one of them.

Test Talks is sponsored by the fantastic folks at Sauce Labs. Try it for free today!
Keep listening
Related episodes

Automation Testing Podcast · Ep. 609
Why Your AI Tests Pass When Your Features Fail with Donovan Brady
with Donovan Brady
Why Your AI Tests Pass When Your Features Fail? Donovan Brady of Leapwork shows how to make
Oct 27

Automation Testing Podcast · Ep. 608
Scary Test Automation POCs Made Easy: Halloween Special With Paul Grossman
with Paul Grossman
Running a proof of concept on test automation tools can feel like a horror movie. Vendors promise
Oct 20

Automation Testing Podcast · Ep. 607
Locust and Azure Load Testing: Create and Debug Load Tests with AI with Lars Holmberg and Abhinav Premsekhar
with Lars Holmberg and Abhinav Premsekhar
Performance testing has never been easier to start, or more important to get right. As teams ship
Oct 6

Automation Testing Podcast · Ep. 606
AI Agents Passed the Tests. Real Devices Didn’t. with Nick Metcalfe
with Nick Metcalfe
Cloud device farms make it easy to get started with real device testing. But what happens when
Sep 29