Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Objectify the Screenplay: A Story of Patterns
Search
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
apetkova
March 18, 2017
Technology
77
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Objectify the Screenplay: A Story of Patterns
QA: Challenge Accepted 3.0 presentation
apetkova
March 18, 2017
More Decks by apetkova
See All by apetkova
Stop Testing, Start Building Quality
apetkova
0
71
The Framework That Knows Its Bugs
apetkova
0
360
Automation Frameworks: First Contact
apetkova
0
170
Quality And The Squad Framework
apetkova
0
260
Motivation 3.0: Burying the carrot & stick
apetkova
0
240
Ex Machina: The framework that knows its bugs
apetkova
0
170
Other Decks in Technology
See All in Technology
AIで仕事のやり方を変える
matsu7874
3
1k
Sigmaユーザーのための有用リソース一挙公開 & Sigmaで使えるMCP #sigma_ucj /useful-resources-for-sigma-computing-users-and-mcps-with-sigma
shinyaa31
0
170
振り返りこそエンジニアの本領
negima
0
340
Snowflakeで実現する全社横断の顧客の声(VOC)分析・活用基盤@Snowflake World Tour Tokyo 2026
yuto16
0
120
AI 駆動 Terraform 開発/SRE_BizReach_MIXI_2
visional_engineering_and_design
3
1.9k
DEFCON34-Write-up_HYCu-MYCu
daikiokazaki
0
110
enechainの内製セルフサービスプラットフォーム
hiyosi
0
140
Bet AI Day 2026丨AIによって本質に戻るシステムリスク管理
layerx
PRO
0
1.3k
リージョンの壁を越える、 ちょっと変わったAWSサービスの話
falken
PRO
0
270
OpenTelemetry eBPF Instrumentationの舞台裏 / Behind the Scenes of OpenTelemetry eBPF Instrumentation
ymotongpoo
3
350
Deploying a Full-Stack Bun-Native Framework on Cloudflare Workers
7nohe
0
110
Claude Code本って、 読む必要あるの?
oikon48
1
150
Featured
See All Featured
Navigating Algorithm Shifts & AI Overviews - #SMXNext
aleyda
1
1.6k
Introduction to Domain-Driven Design and Collaborative software design
baasie
1
970
Getting science done with accelerated Python computing platforms
jacobtomlinson
2
470
Fashionably flexible responsive web design (full day workshop)
malarkey
408
67k
The Invisible Side of Design
smashingmag
301
52k
Redefining SEO in the New Era of Traffic Generation
szymonslowik
1
410
YesSQL, Process and Tooling at Scale
rocio
174
15k
HTML-Aware ERB: The Path to Reactive Rendering @ RubyCon 2026, Rimini, Italy
marcoroth
4
600
How to Get Subject Matter Experts Bought In and Actively Contributing to SEO & PR Initiatives.
livdayseo
0
190
Noah Learner - AI + Me: how we built a GSC Bulk Export data pipeline
techseoconnect
PRO
0
430
Making the Leap to Tech Lead
cromwellryan
135
10k
Build The Right Thing And Hit Your Dates
maggiecrowley
39
3.4k
Transcript
A STORY OF PATTERNS
About Me Aneta Petkova Automation QA Lead, Honeywell Aerospace
[email protected]
linkedin.com/in/apetkova/
Overview Journey #1: Back in time ••The PageObject pattern Journey
#2: Into the now ••The Screenplay pattern Journey #3: Looking at tomorrow ••No spoilers yet
Why should we care about patterns?
The PageObject
PageObject: concept Web Page Page class Test Separation: Keeping things
tidy
PageObject: structure WebDriver config
PageObject: structure WebDriver config Page Object classes
PageObject: structure WebDriver config Page Object classes Test classes
PageObject Web Java private WebElement folderNameLabel; private WebElement downloadAllLink; private
List<WebElement> files; public void sortByName(); public void downloadAll();
PageObject The test method @Test public void sortTest() { BrowseFolderPage
page = new BrowseFolderPage(); page.sortFilesByName(); List<String> actualFileNames = page.getFileNames(); List<String> expectedFileNames = new ArrayList<String>(actualFileNames); expectedFileNames.sort(); Assert.assertEquals(actualFileNames, expectedFileNames, "File names do not match"); }
PageObject The test method @Test public void sortTest() { BrowseFolderPage
page = new BrowseFolderPage(); page.sortFilesByName(); List<String> actualFileNames = page.getFileNames(); List<String> expectedFileNames = new ArrayList<String>(actualFileNames); expectedFileNames.sort(); Assert.assertEquals(actualFileNames, expectedFileNames, "File names do not match"); }
PageObject The test method @Test public void sortTest() { BrowseFolderPage
page = new BrowseFolderPage(); page.sortFilesByName(); List<String> actualFileNames = page.getFileNames(); List<String> expectedFileNames = new ArrayList<String>(actualFileNames); expectedFileNames.sort(); Assert.assertEquals(actualFileNames, expectedFileNames, "File names do not match"); }
PageObject The test method @Test public void sortTest() { BrowseFolderPage
page = new BrowseFolderPage(); page.sortFilesByName(); List<String> actualFileNames = page.getFileNames(); List<String> expectedFileNames = new ArrayList<String>(actualFileNames); expectedFileNames.sort(); Assert.assertEquals(actualFileNames, expectedFileNames, "File names do not match"); } baby_corgi.jpg cartoon_corgi.png snow_corgi.jpg
PageObject The test method @Test public void sortTest() { BrowseFolderPage
page = new BrowseFolderPage(); page.sortFilesByName(); List<String> actualFileNames = page.getFileNames(); List<String> expectedFileNames = new ArrayList<String>(actualFileNames); expectedFileNames.sort(); Assert.assertEquals(actualFileNames, expectedFileNames, "File names do not match"); }
Payoff
Payoff
Payoff
Pitfalls
Pitfalls
Pitfalls
The PageObject
The Screenplay pattern System functionality before system properties Actions before
objects
Screenplay: concept Actor
Screenplay: concept Actor Abilities has
Screenplay: concept Actor Abilities has Actions Tasks enable made up
of performs
Screenplay: concept Actor Abilities Actions Tasks has enable made up
of performs Questions Elements Screen asks about the state of on the interact with
Screenplay: library “Automated Acceptance Testing with Style” - and great
reporting! /Thucydides.info
Screenplay: structure Page Objects
Screenplay: structure Tasks Page Objects
Screenplay: structure State checks Tasks Page Objects
Screenplay: structure Features -> tests State checks Tasks Page Objects
Screenplay The PageObject class public static Target FOLDER_NAME = the(“Folder
name label”).locatedBy(“#locator”); public static Target DOWNLOAD_ALL = the(“Download All link”).locatedBy(“#locator”); public static Target FILES = the(“List of files”).locatedBy(“#locator”);
Screenplay The test method @Test public void should_be_able_to_sort_his_files_by_name() { roland.wasAbleTo(StartWith.aPopulatedFolder());
roland.attemptsTo(SortFilesInFolder.by("Name")); roland.should(seeThat(FileList.displayed(), is(FileList.orderedBy(system)))); }
Screenplay The test method @Test public void should_be_able_to_sort_his_files_by_name() { roland.wasAbleTo(StartWith.aPopulatedFolder())
roland.attemptsTo(SortFilesInFolder.by("Name")); roland.should(seeThat(FileList.displayed(), is(FileList.orderedBy(system)))); }
Screenplay The test method @Test public void should_be_able_to_sort_his_files_by_name() { roland.wasAbleTo(StartWith.aPopulatedFolder());
roland.attemptsTo(SortFilesInFolder .by("Name")); roland.should(seeThat(FileList.displayed(), is(FileList.orderedBy(system)))); }
Screenplay The test method @Test public void should_be_able_to_sort_his_files_by_name() { roland.wasAbleTo(StartWith.aPopulatedFolder());
roland.attemptsTo(SortFilesInFolder.by("Name")); roland.should(seeThat(FileList.displayed(), is(FileList.orderedBy(system)))); }
Serenity report
Serenity report
Payoff
Payoff
Payoff
Payoff
Pitfalls
Pitfalls
Pitfalls
Pitfalls
The middle ground
The middle ground ØFocus on users, not asserts
The middle ground ØFocus on users, not asserts ØKeep tasks
in separate classes
The middle ground ØFocus on users, not asserts ØKeep tasks
in separate classes ØConsider relaxed encapsulation
Define your own journey!
[email protected]
linkedin.com/in/apetkova