SlideShare a Scribd company logo
Writing Maintainable,
Expressive Tests
with PageObjects
Michael Denomy
@mdenomy
About Me
• Senior Developer @TerribleLabs
• Practicing Agile for ~10 years
• @mdenomy on Twitter and gmail
• http://mdenomy.wordpress.com/
I ❤️ TDD
I ❤️ TDD
• Why?
I ❤️ TDD
• Why?
• Makes me a better developer
I ❤️ TDD
• Why?
• Makes me a better developer
• Keeps me thinking of behavior before
implementation
I ❤️ TDD
• Why?
• Makes me a better developer
• Keeps me thinking of behavior before
implementation
• TDD, BDD, more or less the same for me
I ❤️ TDD
• Why?
• Makes me a better developer
• Keeps me thinking of behavior before
implementation
• TDD, BDD, more or less the same for me
• It’s not about testing…..
Well-Factored Tests
• Tests should follow same principles as
application code
• Expressive
• Well-factored
• DRY
What does it mean to be
DRY
• Don’t Repeat Yourself
• Actually it is OK to repeat yourself
• Just eliminate the duplication as part of your
Red-Green-Refactor workflow
What are Page Objects
• Wraps an HTML page in an
application DSL
• Allows us to write
acceptance tests using
application language
• HTML specific bits are kept
in one place
• Tests are less brittle
http://martinfowler.com/bliki/PageObject.html
Let’s look at some code
• Denomy’s Wine Emporium
• https://github.com/mdenomy/foundation-demo
• Originally written to play around with Zurb Foundation’s grid system,
but threw in some tests with PageObjects for this talk
• To see the overall workflow check out these branches in the
following order
• manager-adds-event
• introduce-page-objects
• events-on-homepage
• order-events
• limit-events-on-homepage
• base-page-object
Let’s look at some code
User Story - Manager Creates Events
As a store manager, I want create
events that will be shown on the home
page, so that people visit the store and
buy lots of wine
Summary
• Abstract the implementation of an HTML page
away from your tests
• Write your acceptance tests around application
behaviors
• Write tests with the same focus on quality as
application code
References
• http://martinfowler.com/bliki/PageObject.html
• http://robots.thoughtbot.com/better-acceptance-
tests-with-page-objects
• https://code.google.com/p/selenium/wiki/
PageObjects
Writing Maintainable,
Expressive Tests
with PageObjects
Michael Denomy
@mdenomy

More Related Content

What's hot

Kentico Cloud Best Practices
Kentico Cloud Best PracticesKentico Cloud Best Practices
Kentico Cloud Best Practices
Kentico Software
 
Angular – Say Goodbye to Javascript Soup
Angular – Say Goodbye to Javascript SoupAngular – Say Goodbye to Javascript Soup
Angular – Say Goodbye to Javascript Soup
Graeme Foster
 
Untangling - fall2017 - week6
Untangling - fall2017 - week6Untangling - fall2017 - week6
Untangling - fall2017 - week6
Derek Jacoby
 
The WordPress REST API as a Springboard for Website Greatness
The WordPress REST API as a Springboard for Website GreatnessThe WordPress REST API as a Springboard for Website Greatness
The WordPress REST API as a Springboard for Website Greatness
WP Engine UK
 
Rakshat bhati
Rakshat bhatiRakshat bhati
Rakshat bhati
Rakshat bhati
 
Rock Your Blocks! Web Design Acceleration with Genesis Pro
Rock Your Blocks! Web Design Acceleration with Genesis ProRock Your Blocks! Web Design Acceleration with Genesis Pro
Rock Your Blocks! Web Design Acceleration with Genesis Pro
WP Engine
 
DM 250 Week 1 - The Internet, XHTML, & CSS
DM 250 Week 1 - The Internet, XHTML, & CSSDM 250 Week 1 - The Internet, XHTML, & CSS
DM 250 Week 1 - The Internet, XHTML, & CSS
Joel G Goodman
 
Importance of Content Writing & Marketing for Plugin Developers
Importance of Content Writing & Marketing for Plugin DevelopersImportance of Content Writing & Marketing for Plugin Developers
Importance of Content Writing & Marketing for Plugin Developers
Vishal Kothari
 
Doing Modern Web, aka JavaScript and HTML5 in the Enterprise NYC Code Camp
Doing Modern Web, aka JavaScript and HTML5 in the Enterprise NYC Code CampDoing Modern Web, aka JavaScript and HTML5 in the Enterprise NYC Code Camp
Doing Modern Web, aka JavaScript and HTML5 in the Enterprise NYC Code Camp
Chris Love
 
The Fast Track to Mastering Modern WordPress - Rob Stinson & Carrie Dils
The Fast Track to Mastering Modern WordPress - Rob Stinson & Carrie DilsThe Fast Track to Mastering Modern WordPress - Rob Stinson & Carrie Dils
The Fast Track to Mastering Modern WordPress - Rob Stinson & Carrie Dils
WP Engine
 
Bootstrap Lightning Talk
Bootstrap Lightning TalkBootstrap Lightning Talk
Bootstrap Lightning Talk
jeremyk23
 
From WordPress Configurator to WordPress Developer
From WordPress Configurator to WordPress DeveloperFrom WordPress Configurator to WordPress Developer
From WordPress Configurator to WordPress Developer
Ken Toh
 
Untangling - fall2017 - week 7
Untangling - fall2017 - week 7Untangling - fall2017 - week 7
Untangling - fall2017 - week 7
Derek Jacoby
 
Between a Block & a Hard Place
Between a Block & a Hard PlaceBetween a Block & a Hard Place
Between a Block & a Hard Place
WP Engine
 
Portfolio
PortfolioPortfolio
Portfolio
Siva Ram
 
WordCamp Pokhara - Contributing to the WordPress Repository in a smart Way
WordCamp Pokhara - Contributing to the WordPress Repository in a smart WayWordCamp Pokhara - Contributing to the WordPress Repository in a smart Way
WordCamp Pokhara - Contributing to the WordPress Repository in a smart Way
Mizanur Rahaman Mizan
 
Develop:BBC 2013 - Turbocharge your mobile web apps by using offline
Develop:BBC 2013 - Turbocharge your mobile web apps by using offlineDevelop:BBC 2013 - Turbocharge your mobile web apps by using offline
Develop:BBC 2013 - Turbocharge your mobile web apps by using offline
Jan Jongboom
 
WordCamp Kent 2019 - WP 101: Local Development - Themes and Plugins
WordCamp Kent 2019 - WP 101: Local Development - Themes and PluginsWordCamp Kent 2019 - WP 101: Local Development - Themes and Plugins
WordCamp Kent 2019 - WP 101: Local Development - Themes and Plugins
Joe Querin
 
How To Work Faster & More Profitably With Client Site Starter Templates
How To Work Faster & More Profitably With Client Site Starter TemplatesHow To Work Faster & More Profitably With Client Site Starter Templates
How To Work Faster & More Profitably With Client Site Starter Templates
WP Engine
 
Byowwhc43
Byowwhc43Byowwhc43

What's hot (20)

Kentico Cloud Best Practices
Kentico Cloud Best PracticesKentico Cloud Best Practices
Kentico Cloud Best Practices
 
Angular – Say Goodbye to Javascript Soup
Angular – Say Goodbye to Javascript SoupAngular – Say Goodbye to Javascript Soup
Angular – Say Goodbye to Javascript Soup
 
Untangling - fall2017 - week6
Untangling - fall2017 - week6Untangling - fall2017 - week6
Untangling - fall2017 - week6
 
The WordPress REST API as a Springboard for Website Greatness
The WordPress REST API as a Springboard for Website GreatnessThe WordPress REST API as a Springboard for Website Greatness
The WordPress REST API as a Springboard for Website Greatness
 
Rakshat bhati
Rakshat bhatiRakshat bhati
Rakshat bhati
 
Rock Your Blocks! Web Design Acceleration with Genesis Pro
Rock Your Blocks! Web Design Acceleration with Genesis ProRock Your Blocks! Web Design Acceleration with Genesis Pro
Rock Your Blocks! Web Design Acceleration with Genesis Pro
 
DM 250 Week 1 - The Internet, XHTML, & CSS
DM 250 Week 1 - The Internet, XHTML, & CSSDM 250 Week 1 - The Internet, XHTML, & CSS
DM 250 Week 1 - The Internet, XHTML, & CSS
 
Importance of Content Writing & Marketing for Plugin Developers
Importance of Content Writing & Marketing for Plugin DevelopersImportance of Content Writing & Marketing for Plugin Developers
Importance of Content Writing & Marketing for Plugin Developers
 
Doing Modern Web, aka JavaScript and HTML5 in the Enterprise NYC Code Camp
Doing Modern Web, aka JavaScript and HTML5 in the Enterprise NYC Code CampDoing Modern Web, aka JavaScript and HTML5 in the Enterprise NYC Code Camp
Doing Modern Web, aka JavaScript and HTML5 in the Enterprise NYC Code Camp
 
The Fast Track to Mastering Modern WordPress - Rob Stinson & Carrie Dils
The Fast Track to Mastering Modern WordPress - Rob Stinson & Carrie DilsThe Fast Track to Mastering Modern WordPress - Rob Stinson & Carrie Dils
The Fast Track to Mastering Modern WordPress - Rob Stinson & Carrie Dils
 
Bootstrap Lightning Talk
Bootstrap Lightning TalkBootstrap Lightning Talk
Bootstrap Lightning Talk
 
From WordPress Configurator to WordPress Developer
From WordPress Configurator to WordPress DeveloperFrom WordPress Configurator to WordPress Developer
From WordPress Configurator to WordPress Developer
 
Untangling - fall2017 - week 7
Untangling - fall2017 - week 7Untangling - fall2017 - week 7
Untangling - fall2017 - week 7
 
Between a Block & a Hard Place
Between a Block & a Hard PlaceBetween a Block & a Hard Place
Between a Block & a Hard Place
 
Portfolio
PortfolioPortfolio
Portfolio
 
WordCamp Pokhara - Contributing to the WordPress Repository in a smart Way
WordCamp Pokhara - Contributing to the WordPress Repository in a smart WayWordCamp Pokhara - Contributing to the WordPress Repository in a smart Way
WordCamp Pokhara - Contributing to the WordPress Repository in a smart Way
 
Develop:BBC 2013 - Turbocharge your mobile web apps by using offline
Develop:BBC 2013 - Turbocharge your mobile web apps by using offlineDevelop:BBC 2013 - Turbocharge your mobile web apps by using offline
Develop:BBC 2013 - Turbocharge your mobile web apps by using offline
 
WordCamp Kent 2019 - WP 101: Local Development - Themes and Plugins
WordCamp Kent 2019 - WP 101: Local Development - Themes and PluginsWordCamp Kent 2019 - WP 101: Local Development - Themes and Plugins
WordCamp Kent 2019 - WP 101: Local Development - Themes and Plugins
 
How To Work Faster & More Profitably With Client Site Starter Templates
How To Work Faster & More Profitably With Client Site Starter TemplatesHow To Work Faster & More Profitably With Client Site Starter Templates
How To Work Faster & More Profitably With Client Site Starter Templates
 
Byowwhc43
Byowwhc43Byowwhc43
Byowwhc43
 

Similar to Writing Maintainable Tests with PageObjects

Why use Go for web development?
Why use Go for web development?Why use Go for web development?
Why use Go for web development?
Weng Wei
 
Getting started with dev tools (atl)
Getting started with dev tools (atl)Getting started with dev tools (atl)
Getting started with dev tools (atl)
Thinkful
 
11 Amazing things I Learnt At Word Camp Sydney 2014
11 Amazing things I Learnt At Word Camp Sydney 201411 Amazing things I Learnt At Word Camp Sydney 2014
11 Amazing things I Learnt At Word Camp Sydney 2014
WordPressBrisbane
 
SEO for Visibility, Action, & Conversion
SEO for Visibility, Action, & ConversionSEO for Visibility, Action, & Conversion
SEO for Visibility, Action, & Conversion
Cirrus ABS
 
Code stock
Code stockCode stock
Code stock
Erin Page
 
Web development | Derin Dolen
Web development | Derin Dolen Web development | Derin Dolen
Web development | Derin Dolen
Derin Dolen
 
How Not to Be Conned by Your Drupal Vendor!
How Not to Be Conned by Your Drupal Vendor!How Not to Be Conned by Your Drupal Vendor!
How Not to Be Conned by Your Drupal Vendor!
pixelonion
 
Writing clean and maintainable code
Writing clean and maintainable codeWriting clean and maintainable code
Writing clean and maintainable code
Marko Heijnen
 
How To Use Selenium Successfully (Java Edition)
How To Use Selenium Successfully (Java Edition)How To Use Selenium Successfully (Java Edition)
How To Use Selenium Successfully (Java Edition)
Sauce Labs
 
14 Habits of Great SQL Developers
14 Habits of Great SQL Developers14 Habits of Great SQL Developers
14 Habits of Great SQL Developers
Ike Ellis
 
Creating a Great Portfolio Site
Creating a Great Portfolio SiteCreating a Great Portfolio Site
Creating a Great Portfolio Site
Mel Choyce
 
Software Engineering - Trends & Industry Practices
Software Engineering - Trends & Industry PracticesSoftware Engineering - Trends & Industry Practices
Software Engineering - Trends & Industry Practices
Alfred Jett Grandeza
 
.NET executable requirements
.NET executable requirements.NET executable requirements
.NET executable requirements
Godfrey Nolan
 
Mastering Test Automation: How to Use Selenium Successfully
Mastering Test Automation: How to Use Selenium Successfully Mastering Test Automation: How to Use Selenium Successfully
Mastering Test Automation: How to Use Selenium Successfully
Applitools
 
Do's and don'ts for Office 365 development
Do's and don'ts for Office 365 developmentDo's and don'ts for Office 365 development
Do's and don'ts for Office 365 development
Chris O'Brien
 
Make your website work for you
Make your website work for youMake your website work for you
Make your website work for you
Warren Denley
 
Driving application development through behavior driven development
Driving application development through behavior driven developmentDriving application development through behavior driven development
Driving application development through behavior driven development
Einar Ingebrigtsen
 
How to guarantee your change is integrated to Moodle core
How to guarantee your change is integrated to Moodle coreHow to guarantee your change is integrated to Moodle core
How to guarantee your change is integrated to Moodle core
Dan Poltawski
 
WTF: Where To Focus when you take over a Drupal project
WTF: Where To Focus when you take over a Drupal projectWTF: Where To Focus when you take over a Drupal project
WTF: Where To Focus when you take over a Drupal project
Symetris
 
Devconf 2011 - PHP - How Yii framework is developed
Devconf 2011 - PHP - How Yii framework is developedDevconf 2011 - PHP - How Yii framework is developed
Devconf 2011 - PHP - How Yii framework is developed
Alexander Makarov
 

Similar to Writing Maintainable Tests with PageObjects (20)

Why use Go for web development?
Why use Go for web development?Why use Go for web development?
Why use Go for web development?
 
Getting started with dev tools (atl)
Getting started with dev tools (atl)Getting started with dev tools (atl)
Getting started with dev tools (atl)
 
11 Amazing things I Learnt At Word Camp Sydney 2014
11 Amazing things I Learnt At Word Camp Sydney 201411 Amazing things I Learnt At Word Camp Sydney 2014
11 Amazing things I Learnt At Word Camp Sydney 2014
 
SEO for Visibility, Action, & Conversion
SEO for Visibility, Action, & ConversionSEO for Visibility, Action, & Conversion
SEO for Visibility, Action, & Conversion
 
Code stock
Code stockCode stock
Code stock
 
Web development | Derin Dolen
Web development | Derin Dolen Web development | Derin Dolen
Web development | Derin Dolen
 
How Not to Be Conned by Your Drupal Vendor!
How Not to Be Conned by Your Drupal Vendor!How Not to Be Conned by Your Drupal Vendor!
How Not to Be Conned by Your Drupal Vendor!
 
Writing clean and maintainable code
Writing clean and maintainable codeWriting clean and maintainable code
Writing clean and maintainable code
 
How To Use Selenium Successfully (Java Edition)
How To Use Selenium Successfully (Java Edition)How To Use Selenium Successfully (Java Edition)
How To Use Selenium Successfully (Java Edition)
 
14 Habits of Great SQL Developers
14 Habits of Great SQL Developers14 Habits of Great SQL Developers
14 Habits of Great SQL Developers
 
Creating a Great Portfolio Site
Creating a Great Portfolio SiteCreating a Great Portfolio Site
Creating a Great Portfolio Site
 
Software Engineering - Trends & Industry Practices
Software Engineering - Trends & Industry PracticesSoftware Engineering - Trends & Industry Practices
Software Engineering - Trends & Industry Practices
 
.NET executable requirements
.NET executable requirements.NET executable requirements
.NET executable requirements
 
Mastering Test Automation: How to Use Selenium Successfully
Mastering Test Automation: How to Use Selenium Successfully Mastering Test Automation: How to Use Selenium Successfully
Mastering Test Automation: How to Use Selenium Successfully
 
Do's and don'ts for Office 365 development
Do's and don'ts for Office 365 developmentDo's and don'ts for Office 365 development
Do's and don'ts for Office 365 development
 
Make your website work for you
Make your website work for youMake your website work for you
Make your website work for you
 
Driving application development through behavior driven development
Driving application development through behavior driven developmentDriving application development through behavior driven development
Driving application development through behavior driven development
 
How to guarantee your change is integrated to Moodle core
How to guarantee your change is integrated to Moodle coreHow to guarantee your change is integrated to Moodle core
How to guarantee your change is integrated to Moodle core
 
WTF: Where To Focus when you take over a Drupal project
WTF: Where To Focus when you take over a Drupal projectWTF: Where To Focus when you take over a Drupal project
WTF: Where To Focus when you take over a Drupal project
 
Devconf 2011 - PHP - How Yii framework is developed
Devconf 2011 - PHP - How Yii framework is developedDevconf 2011 - PHP - How Yii framework is developed
Devconf 2011 - PHP - How Yii framework is developed
 

More from Michael Denomy

Intro to automated testing
Intro to automated testingIntro to automated testing
Intro to automated testing
Michael Denomy
 
Breathe In and Out With Me - Burlington Ruby Conference 2015
Breathe In and Out With Me - Burlington Ruby Conference 2015Breathe In and Out With Me - Burlington Ruby Conference 2015
Breathe In and Out With Me - Burlington Ruby Conference 2015
Michael Denomy
 
Memory Management in RubyMotion
Memory Management in RubyMotionMemory Management in RubyMotion
Memory Management in RubyMotion
Michael Denomy
 
Aikido, Controller Tests, and LinkedIn
Aikido, Controller Tests, and LinkedInAikido, Controller Tests, and LinkedIn
Aikido, Controller Tests, and LinkedIn
Michael Denomy
 
Reinventing Yourself
Reinventing YourselfReinventing Yourself
Reinventing Yourself
Michael Denomy
 
Design Principles - Michael Denomy at Launch Academy
Design Principles - Michael Denomy at Launch AcademyDesign Principles - Michael Denomy at Launch Academy
Design Principles - Michael Denomy at Launch Academy
Michael Denomy
 
From Ruby on Rails to RubyMotion - Writing your First iOS App with RubyMotion
From Ruby on Rails to RubyMotion - Writing your First iOS App with RubyMotionFrom Ruby on Rails to RubyMotion - Writing your First iOS App with RubyMotion
From Ruby on Rails to RubyMotion - Writing your First iOS App with RubyMotion
Michael Denomy
 
Debugging rails
Debugging railsDebugging rails
Debugging rails
Michael Denomy
 
Introduction to Test Driven Development
Introduction to Test Driven DevelopmentIntroduction to Test Driven Development
Introduction to Test Driven Development
Michael Denomy
 

More from Michael Denomy (9)

Intro to automated testing
Intro to automated testingIntro to automated testing
Intro to automated testing
 
Breathe In and Out With Me - Burlington Ruby Conference 2015
Breathe In and Out With Me - Burlington Ruby Conference 2015Breathe In and Out With Me - Burlington Ruby Conference 2015
Breathe In and Out With Me - Burlington Ruby Conference 2015
 
Memory Management in RubyMotion
Memory Management in RubyMotionMemory Management in RubyMotion
Memory Management in RubyMotion
 
Aikido, Controller Tests, and LinkedIn
Aikido, Controller Tests, and LinkedInAikido, Controller Tests, and LinkedIn
Aikido, Controller Tests, and LinkedIn
 
Reinventing Yourself
Reinventing YourselfReinventing Yourself
Reinventing Yourself
 
Design Principles - Michael Denomy at Launch Academy
Design Principles - Michael Denomy at Launch AcademyDesign Principles - Michael Denomy at Launch Academy
Design Principles - Michael Denomy at Launch Academy
 
From Ruby on Rails to RubyMotion - Writing your First iOS App with RubyMotion
From Ruby on Rails to RubyMotion - Writing your First iOS App with RubyMotionFrom Ruby on Rails to RubyMotion - Writing your First iOS App with RubyMotion
From Ruby on Rails to RubyMotion - Writing your First iOS App with RubyMotion
 
Debugging rails
Debugging railsDebugging rails
Debugging rails
 
Introduction to Test Driven Development
Introduction to Test Driven DevelopmentIntroduction to Test Driven Development
Introduction to Test Driven Development
 

Recently uploaded

UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5
DianaGray10
 
Artificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopmentArtificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopment
Octavian Nadolu
 
Microsoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdfMicrosoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdf
Uni Systems S.M.S.A.
 
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with SlackLet's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
shyamraj55
 
Full-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalizationFull-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalization
Zilliz
 
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Speck&Tech
 
Presentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of GermanyPresentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of Germany
innovationoecd
 
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
名前 です男
 
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
Neo4j
 
Introduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - CybersecurityIntroduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - Cybersecurity
mikeeftimakis1
 
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
Neo4j
 
Generative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to ProductionGenerative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to Production
Aggregage
 
Mind map of terminologies used in context of Generative AI
Mind map of terminologies used in context of Generative AIMind map of terminologies used in context of Generative AI
Mind map of terminologies used in context of Generative AI
Kumud Singh
 
Large Language Model (LLM) and it’s Geospatial Applications
Large Language Model (LLM) and it’s Geospatial ApplicationsLarge Language Model (LLM) and it’s Geospatial Applications
Large Language Model (LLM) and it’s Geospatial Applications
Rohit Gautam
 
“I’m still / I’m still / Chaining from the Block”
“I’m still / I’m still / Chaining from the Block”“I’m still / I’m still / Chaining from the Block”
“I’m still / I’m still / Chaining from the Block”
Claudio Di Ciccio
 
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
SOFTTECHHUB
 
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdfObservability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Paige Cruz
 
Building RAG with self-deployed Milvus vector database and Snowpark Container...
Building RAG with self-deployed Milvus vector database and Snowpark Container...Building RAG with self-deployed Milvus vector database and Snowpark Container...
Building RAG with self-deployed Milvus vector database and Snowpark Container...
Zilliz
 
How to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptxHow to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptx
danishmna97
 
20240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 202420240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 2024
Matthew Sinclair
 

Recently uploaded (20)

UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5
 
Artificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopmentArtificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopment
 
Microsoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdfMicrosoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdf
 
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with SlackLet's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
 
Full-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalizationFull-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalization
 
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
 
Presentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of GermanyPresentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of Germany
 
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
 
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
 
Introduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - CybersecurityIntroduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - Cybersecurity
 
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
 
Generative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to ProductionGenerative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to Production
 
Mind map of terminologies used in context of Generative AI
Mind map of terminologies used in context of Generative AIMind map of terminologies used in context of Generative AI
Mind map of terminologies used in context of Generative AI
 
Large Language Model (LLM) and it’s Geospatial Applications
Large Language Model (LLM) and it’s Geospatial ApplicationsLarge Language Model (LLM) and it’s Geospatial Applications
Large Language Model (LLM) and it’s Geospatial Applications
 
“I’m still / I’m still / Chaining from the Block”
“I’m still / I’m still / Chaining from the Block”“I’m still / I’m still / Chaining from the Block”
“I’m still / I’m still / Chaining from the Block”
 
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
 
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdfObservability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
 
Building RAG with self-deployed Milvus vector database and Snowpark Container...
Building RAG with self-deployed Milvus vector database and Snowpark Container...Building RAG with self-deployed Milvus vector database and Snowpark Container...
Building RAG with self-deployed Milvus vector database and Snowpark Container...
 
How to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptxHow to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptx
 
20240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 202420240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 2024
 

Writing Maintainable Tests with PageObjects

  • 1. Writing Maintainable, Expressive Tests with PageObjects Michael Denomy @mdenomy
  • 2. About Me • Senior Developer @TerribleLabs • Practicing Agile for ~10 years • @mdenomy on Twitter and gmail • http://mdenomy.wordpress.com/
  • 5. I ❤️ TDD • Why? • Makes me a better developer
  • 6. I ❤️ TDD • Why? • Makes me a better developer • Keeps me thinking of behavior before implementation
  • 7. I ❤️ TDD • Why? • Makes me a better developer • Keeps me thinking of behavior before implementation • TDD, BDD, more or less the same for me
  • 8. I ❤️ TDD • Why? • Makes me a better developer • Keeps me thinking of behavior before implementation • TDD, BDD, more or less the same for me • It’s not about testing…..
  • 9. Well-Factored Tests • Tests should follow same principles as application code • Expressive • Well-factored • DRY
  • 10. What does it mean to be DRY • Don’t Repeat Yourself • Actually it is OK to repeat yourself • Just eliminate the duplication as part of your Red-Green-Refactor workflow
  • 11. What are Page Objects • Wraps an HTML page in an application DSL • Allows us to write acceptance tests using application language • HTML specific bits are kept in one place • Tests are less brittle http://martinfowler.com/bliki/PageObject.html
  • 12. Let’s look at some code • Denomy’s Wine Emporium • https://github.com/mdenomy/foundation-demo • Originally written to play around with Zurb Foundation’s grid system, but threw in some tests with PageObjects for this talk • To see the overall workflow check out these branches in the following order • manager-adds-event • introduce-page-objects • events-on-homepage • order-events • limit-events-on-homepage • base-page-object
  • 13. Let’s look at some code User Story - Manager Creates Events As a store manager, I want create events that will be shown on the home page, so that people visit the store and buy lots of wine
  • 14. Summary • Abstract the implementation of an HTML page away from your tests • Write your acceptance tests around application behaviors • Write tests with the same focus on quality as application code
  • 16. Writing Maintainable, Expressive Tests with PageObjects Michael Denomy @mdenomy