SlideShare a Scribd company logo
1 of 30
PAGE OBJECTS
THE GOOD, THE BAD, AND THE UGLY
WHO AM I?
• DAWN CODE, INDESCRIBABLE!
• COMP SCI DEGREE FROM CLEMSON, 2001
• TESTER -> PROGRAMMER -> TESTER
• LIFELONG LEARNER
• MACHINE LEARNER
• CURRENTLY QUALITY ENGINEERING MANAGER AT IBM WATSON HEALTH CLINICAL
DEVELOPMENT
IS TEST AUTOMATION CODE REAL CODE?
SHOULD AUTOMATION CODE BE WRITTEN FOLLOWING THE SAME CONVENTIONS
AS PRODUCTION DEVELOPERS WRITING PRODUCTION CODE?
CERTAINLY NOT?
DOES THAT MEAN WE SHOULD IGNORE
ALL CLEAN CODING PRACTICES?
OF COURSE NOT
THE HAPPY MEDIUM
• NO NEED TO GET INTO DEEP, TECHNICAL, PROGRAMMING CONCEPTS
• ALSO WE DO NOT WANT TO END UP WITH A PROJECT THAT COSTS MORE TO
MAINTAIN THAN IT IS WORTH TO EXECUTE
• TESTERS CAN START WITH SOME SMALL PRACTICES THAT WORK TOWARD
CLEAN, MAINTAINABLE, CODE
MAKE CODE HUMAN READABLE
• CODE IS READ BY HUMANS, NOT
COMPUTERS
• CODE SHOULD CONVEY INTENT
• NAMES SHOULD BE MEANINGFUL
• NAMES SHOULD NOT BE ABBREVIATED
HOW COULD WE MODIFY THIS?
MAYBE LIKE THIS?
DRY: DON’T REPEAT YOURSELF
• IF YOU FIND THAT YOU DO IT MORE THAN ONCE, PULL IT OUT INTO A SEPARATE
METHOD
• IF YOU FIND THAT YOU ARE COPYING AND PASTING CODE, CONSIDER HOW
MUCH YOU ARE REPEATING YOURSELF
WHAT HAPPENS THE NEXT TIME WE WANT TO
OPEN THAT EXCEL SPREADSHEET?
WHAT ABOUT WHEN ANOTHER USER
NEEDS TO PUT THEIR OWN PATH IN?
WHAT ABOUT WHEN WE NEED TO INSERT
A SHEET AS SHEET 1 IN THESE EXCEL
FILES?
EVEN BETTER …
CLEAN CODE FOR TESTERS
• NAME ALL VALUES WITH MEANINGFUL, RELEVANT, HUMAN-READABLE NAMES
• DON’T REPEAT YOURSELF
GET STARTED WITH SELENIUM
• HTTP://WWW.SELENIUMHQ.ORG/DOCS/03_WEBDRIVER.JSP
IN THIS MODEL …
https://udayhere.files.wordpress.com/2012/06/testautomation1.jpg
WHAT DO WE INTEND TO MODEL?
MAYBE MORE LIKE THIS?
WHY USE PAGE OBJECTS?
• CLEAN SEPARATION BETWEEN TEST CODE AND PAGE SPECIFIC CODE
• REDUCE/REMOVE DUPLICATION FOR OBJECT LOCATION AND INTERACTION
• TEST STEPS HAVE MORE MEANINGFUL NAMES ABOUT WHAT THE TEST IS
ACTUALLY DOING
PAGE OBJECT PATTERNS
• GROWING PAGE OBJECTS ORGANICALLY
• SELF-VERIFICATION
• BUILT-IN NAVIGATION
• NO ASSERTIONS IN THE PAGE OBJECT
• PRIVATE ELEMENTS IN PAGE OBJECT
WHAT GOES WRONG?
• MOST OF IT IS ABOUT SCALING
• FIRST: WHAT IS A “PAGE”, ANYWAY?
• LARGE AND COMPLEX PAGE OBJECTS
• NAVIGATION?
• IT DOES REQUIRE HIGHER LEVEL OF PROGRAMMING KNOWLEDGE
• PAGE OBJECT REPO IS HIGHLY APPLICATION SPECIFIC
WHAT ARE YOUR EXPERIENCES?
FOR FURTHER READING
• WRITING MAINTAINABLE AUTOMATED TESTS, BY DALE EMERY
• HTTPS://MARTINFOWLER.COM/BLIKI/PAGEOBJECT.HTML
• HTTPS://GITHUB.COM/SELENIUMHQ/SELENIUM/WIKI/PAGEOBJECTS
• HTTP://WWW.SELENIUMHQ.ORG/DOCS/06_TEST_DESIGN_CONSIDERATIONS.JSP

More Related Content

What's hot

SQL Phone Home: Teaching Your SQL Servers to Call for Help
SQL Phone Home: Teaching Your SQL Servers to Call for HelpSQL Phone Home: Teaching Your SQL Servers to Call for Help
SQL Phone Home: Teaching Your SQL Servers to Call for HelpMike Hillwig
 
A Second Set Of Eyes: Getting The Most From Code Reviews
A Second Set Of Eyes: Getting The Most From Code ReviewsA Second Set Of Eyes: Getting The Most From Code Reviews
A Second Set Of Eyes: Getting The Most From Code ReviewsBen McCormick
 
Geo Tag Symbian Signed
Geo Tag Symbian SignedGeo Tag Symbian Signed
Geo Tag Symbian Signedmansadler
 
Do More With Less: SQL Central Management Server and Multi-Server Administration
Do More With Less: SQL Central Management Server and Multi-Server AdministrationDo More With Less: SQL Central Management Server and Multi-Server Administration
Do More With Less: SQL Central Management Server and Multi-Server AdministrationMike Hillwig
 
DevOps and the Bottom Line
DevOps and the Bottom LineDevOps and the Bottom Line
DevOps and the Bottom LineNicole Forsgren
 
SharePoint Summit 2013 - Vancouver - MS Access 2013 - The new (old) thing
SharePoint Summit 2013 - Vancouver - MS Access 2013 - The new (old) thingSharePoint Summit 2013 - Vancouver - MS Access 2013 - The new (old) thing
SharePoint Summit 2013 - Vancouver - MS Access 2013 - The new (old) thingRuven Gotz
 

What's hot (7)

SQL Phone Home: Teaching Your SQL Servers to Call for Help
SQL Phone Home: Teaching Your SQL Servers to Call for HelpSQL Phone Home: Teaching Your SQL Servers to Call for Help
SQL Phone Home: Teaching Your SQL Servers to Call for Help
 
A Second Set Of Eyes: Getting The Most From Code Reviews
A Second Set Of Eyes: Getting The Most From Code ReviewsA Second Set Of Eyes: Getting The Most From Code Reviews
A Second Set Of Eyes: Getting The Most From Code Reviews
 
Geo Tag Symbian Signed
Geo Tag Symbian SignedGeo Tag Symbian Signed
Geo Tag Symbian Signed
 
Do More With Less: SQL Central Management Server and Multi-Server Administration
Do More With Less: SQL Central Management Server and Multi-Server AdministrationDo More With Less: SQL Central Management Server and Multi-Server Administration
Do More With Less: SQL Central Management Server and Multi-Server Administration
 
DevOps and the Bottom Line
DevOps and the Bottom LineDevOps and the Bottom Line
DevOps and the Bottom Line
 
What is good code?
What is good code?What is good code?
What is good code?
 
SharePoint Summit 2013 - Vancouver - MS Access 2013 - The new (old) thing
SharePoint Summit 2013 - Vancouver - MS Access 2013 - The new (old) thingSharePoint Summit 2013 - Vancouver - MS Access 2013 - The new (old) thing
SharePoint Summit 2013 - Vancouver - MS Access 2013 - The new (old) thing
 

Similar to Page objects: the good, the bad, the ugly

Writing Maintainable Test Automation
Writing Maintainable Test AutomationWriting Maintainable Test Automation
Writing Maintainable Test AutomationDawn Code
 
{10.0} Test Driven Development.pptx
{10.0} Test Driven Development.pptx{10.0} Test Driven Development.pptx
{10.0} Test Driven Development.pptxAmalEldhose2
 
Improving the Design of Existing Software
Improving the Design of Existing SoftwareImproving the Design of Existing Software
Improving the Design of Existing SoftwareSteven Smith
 
A Brief Introduction to Test-Driven Development
A Brief Introduction to Test-Driven DevelopmentA Brief Introduction to Test-Driven Development
A Brief Introduction to Test-Driven DevelopmentShawn Jones
 
Agile Mumbai 2020 Conference | How to get the best ROI on Your Test Automati...
Agile Mumbai 2020 Conference |  How to get the best ROI on Your Test Automati...Agile Mumbai 2020 Conference |  How to get the best ROI on Your Test Automati...
Agile Mumbai 2020 Conference | How to get the best ROI on Your Test Automati...AgileNetwork
 
Architecting for Enterprise with JavaScript
Architecting for Enterprise with JavaScriptArchitecting for Enterprise with JavaScript
Architecting for Enterprise with JavaScriptKurtis Kemple
 
Becoming a better programmer - unit testing
Becoming a better programmer - unit testingBecoming a better programmer - unit testing
Becoming a better programmer - unit testingDuy Tan Geek
 
Adopting Agile
Adopting AgileAdopting Agile
Adopting AgileCoverity
 
Joe Cisar - Everything I Know About TDD - Agile Midwest 2019
Joe Cisar - Everything I Know About TDD - Agile Midwest 2019Joe Cisar - Everything I Know About TDD - Agile Midwest 2019
Joe Cisar - Everything I Know About TDD - Agile Midwest 2019Jason Tice
 
Improving the Quality of Existing Software
Improving the Quality of Existing SoftwareImproving the Quality of Existing Software
Improving the Quality of Existing SoftwareSteven Smith
 
Mr. Burhan Khalid - secure dev.
Mr. Burhan Khalid - secure dev.Mr. Burhan Khalid - secure dev.
Mr. Burhan Khalid - secure dev.nooralmousa
 
How To Tidy Up Your Test Code
How To Tidy Up Your Test CodeHow To Tidy Up Your Test Code
How To Tidy Up Your Test CodeRock Interview
 
Agile testingandautomation
Agile testingandautomationAgile testingandautomation
Agile testingandautomationjeisner
 
Test Driven Development with Laravel
Test Driven Development with LaravelTest Driven Development with Laravel
Test Driven Development with LaravelTyler Johnston
 

Similar to Page objects: the good, the bad, the ugly (20)

Writing Maintainable Test Automation
Writing Maintainable Test AutomationWriting Maintainable Test Automation
Writing Maintainable Test Automation
 
{10.0} Test Driven Development.pptx
{10.0} Test Driven Development.pptx{10.0} Test Driven Development.pptx
{10.0} Test Driven Development.pptx
 
Improving the Design of Existing Software
Improving the Design of Existing SoftwareImproving the Design of Existing Software
Improving the Design of Existing Software
 
Intro to TDD
Intro to TDDIntro to TDD
Intro to TDD
 
Clean code
Clean codeClean code
Clean code
 
A Brief Introduction to Test-Driven Development
A Brief Introduction to Test-Driven DevelopmentA Brief Introduction to Test-Driven Development
A Brief Introduction to Test-Driven Development
 
Agile Mumbai 2020 Conference | How to get the best ROI on Your Test Automati...
Agile Mumbai 2020 Conference |  How to get the best ROI on Your Test Automati...Agile Mumbai 2020 Conference |  How to get the best ROI on Your Test Automati...
Agile Mumbai 2020 Conference | How to get the best ROI on Your Test Automati...
 
Architecting for Enterprise with JavaScript
Architecting for Enterprise with JavaScriptArchitecting for Enterprise with JavaScript
Architecting for Enterprise with JavaScript
 
Clean Code Talk (draft)
Clean Code Talk (draft)Clean Code Talk (draft)
Clean Code Talk (draft)
 
Becoming a better programmer - unit testing
Becoming a better programmer - unit testingBecoming a better programmer - unit testing
Becoming a better programmer - unit testing
 
Adopting Agile
Adopting AgileAdopting Agile
Adopting Agile
 
Joe Cisar - Everything I Know About TDD - Agile Midwest 2019
Joe Cisar - Everything I Know About TDD - Agile Midwest 2019Joe Cisar - Everything I Know About TDD - Agile Midwest 2019
Joe Cisar - Everything I Know About TDD - Agile Midwest 2019
 
Improving the Quality of Existing Software
Improving the Quality of Existing SoftwareImproving the Quality of Existing Software
Improving the Quality of Existing Software
 
Tdd
TddTdd
Tdd
 
Mr. Burhan Khalid - secure dev.
Mr. Burhan Khalid - secure dev.Mr. Burhan Khalid - secure dev.
Mr. Burhan Khalid - secure dev.
 
Secured Development
Secured DevelopmentSecured Development
Secured Development
 
Software testing
Software testingSoftware testing
Software testing
 
How To Tidy Up Your Test Code
How To Tidy Up Your Test CodeHow To Tidy Up Your Test Code
How To Tidy Up Your Test Code
 
Agile testingandautomation
Agile testingandautomationAgile testingandautomation
Agile testingandautomation
 
Test Driven Development with Laravel
Test Driven Development with LaravelTest Driven Development with Laravel
Test Driven Development with Laravel
 

More from Dawn Code

Executable Specifications with FitNesse and Selenium
Executable Specifications with FitNesse and SeleniumExecutable Specifications with FitNesse and Selenium
Executable Specifications with FitNesse and SeleniumDawn Code
 
Executable Specifications with FitNesse and Selenium
Executable Specifications with FitNesse and SeleniumExecutable Specifications with FitNesse and Selenium
Executable Specifications with FitNesse and SeleniumDawn Code
 
A Sampling of Tools
A Sampling of ToolsA Sampling of Tools
A Sampling of ToolsDawn Code
 
Testing in the Wild
Testing in the WildTesting in the Wild
Testing in the WildDawn Code
 
Fitting Organizational Structure
Fitting Organizational StructureFitting Organizational Structure
Fitting Organizational StructureDawn Code
 
Pair development
Pair developmentPair development
Pair developmentDawn Code
 
Remote Dev/Test Pairing
Remote Dev/Test PairingRemote Dev/Test Pairing
Remote Dev/Test PairingDawn Code
 
Crowdsource Your Career
Crowdsource Your CareerCrowdsource Your Career
Crowdsource Your CareerDawn Code
 
How Low Can Your Tests Go
How Low Can Your Tests GoHow Low Can Your Tests Go
How Low Can Your Tests GoDawn Code
 
Exploratory testing part 2
Exploratory testing part 2Exploratory testing part 2
Exploratory testing part 2Dawn Code
 
Exploratory testing part 1
Exploratory testing part 1Exploratory testing part 1
Exploratory testing part 1Dawn Code
 
Exploratory testing part 3
Exploratory testing part 3Exploratory testing part 3
Exploratory testing part 3Dawn Code
 
Agile and Exploratory Testing Jeopardy
Agile and Exploratory Testing JeopardyAgile and Exploratory Testing Jeopardy
Agile and Exploratory Testing JeopardyDawn Code
 
Pair Development from the Trenches
Pair Development from the TrenchesPair Development from the Trenches
Pair Development from the TrenchesDawn Code
 
Testing Legacy Apps Mindmap
Testing Legacy Apps MindmapTesting Legacy Apps Mindmap
Testing Legacy Apps MindmapDawn Code
 
Testing Legacy Apps
Testing Legacy AppsTesting Legacy Apps
Testing Legacy AppsDawn Code
 

More from Dawn Code (16)

Executable Specifications with FitNesse and Selenium
Executable Specifications with FitNesse and SeleniumExecutable Specifications with FitNesse and Selenium
Executable Specifications with FitNesse and Selenium
 
Executable Specifications with FitNesse and Selenium
Executable Specifications with FitNesse and SeleniumExecutable Specifications with FitNesse and Selenium
Executable Specifications with FitNesse and Selenium
 
A Sampling of Tools
A Sampling of ToolsA Sampling of Tools
A Sampling of Tools
 
Testing in the Wild
Testing in the WildTesting in the Wild
Testing in the Wild
 
Fitting Organizational Structure
Fitting Organizational StructureFitting Organizational Structure
Fitting Organizational Structure
 
Pair development
Pair developmentPair development
Pair development
 
Remote Dev/Test Pairing
Remote Dev/Test PairingRemote Dev/Test Pairing
Remote Dev/Test Pairing
 
Crowdsource Your Career
Crowdsource Your CareerCrowdsource Your Career
Crowdsource Your Career
 
How Low Can Your Tests Go
How Low Can Your Tests GoHow Low Can Your Tests Go
How Low Can Your Tests Go
 
Exploratory testing part 2
Exploratory testing part 2Exploratory testing part 2
Exploratory testing part 2
 
Exploratory testing part 1
Exploratory testing part 1Exploratory testing part 1
Exploratory testing part 1
 
Exploratory testing part 3
Exploratory testing part 3Exploratory testing part 3
Exploratory testing part 3
 
Agile and Exploratory Testing Jeopardy
Agile and Exploratory Testing JeopardyAgile and Exploratory Testing Jeopardy
Agile and Exploratory Testing Jeopardy
 
Pair Development from the Trenches
Pair Development from the TrenchesPair Development from the Trenches
Pair Development from the Trenches
 
Testing Legacy Apps Mindmap
Testing Legacy Apps MindmapTesting Legacy Apps Mindmap
Testing Legacy Apps Mindmap
 
Testing Legacy Apps
Testing Legacy AppsTesting Legacy Apps
Testing Legacy Apps
 

Recently uploaded

Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...MyIntelliSource, Inc.
 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...OnePlan Solutions
 
Implementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureImplementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureDinusha Kumarasiri
 
Asset Management Software - Infographic
Asset Management Software - InfographicAsset Management Software - Infographic
Asset Management Software - InfographicHr365.us smith
 
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...soniya singh
 
What is Binary Language? Computer Number Systems
What is Binary Language?  Computer Number SystemsWhat is Binary Language?  Computer Number Systems
What is Binary Language? Computer Number SystemsJheuzeDellosa
 
What are the features of Vehicle Tracking System?
What are the features of Vehicle Tracking System?What are the features of Vehicle Tracking System?
What are the features of Vehicle Tracking System?Watsoo Telematics
 
The Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdfThe Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdfPower Karaoke
 
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataAdobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataBradBedford3
 
What is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWhat is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWave PLM
 
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideBuilding Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideChristina Lin
 
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio, Inc.
 
chapter--4-software-project-planning.ppt
chapter--4-software-project-planning.pptchapter--4-software-project-planning.ppt
chapter--4-software-project-planning.pptkotipi9215
 
Engage Usergroup 2024 - The Good The Bad_The Ugly
Engage Usergroup 2024 - The Good The Bad_The UglyEngage Usergroup 2024 - The Good The Bad_The Ugly
Engage Usergroup 2024 - The Good The Bad_The UglyFrank van der Linden
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...MyIntelliSource, Inc.
 
EY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityEY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityNeo4j
 
Unit 1.1 Excite Part 1, class 9, cbse...
Unit 1.1 Excite Part 1, class 9, cbse...Unit 1.1 Excite Part 1, class 9, cbse...
Unit 1.1 Excite Part 1, class 9, cbse...aditisharan08
 
buds n tech IT solutions
buds n  tech IT                solutionsbuds n  tech IT                solutions
buds n tech IT solutionsmonugehlot87
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantAxelRicardoTrocheRiq
 

Recently uploaded (20)

Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...
 
Implementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureImplementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with Azure
 
Asset Management Software - Infographic
Asset Management Software - InfographicAsset Management Software - Infographic
Asset Management Software - Infographic
 
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
 
What is Binary Language? Computer Number Systems
What is Binary Language?  Computer Number SystemsWhat is Binary Language?  Computer Number Systems
What is Binary Language? Computer Number Systems
 
What are the features of Vehicle Tracking System?
What are the features of Vehicle Tracking System?What are the features of Vehicle Tracking System?
What are the features of Vehicle Tracking System?
 
The Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdfThe Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdf
 
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataAdobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
 
What is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWhat is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need It
 
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideBuilding Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
 
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
 
chapter--4-software-project-planning.ppt
chapter--4-software-project-planning.pptchapter--4-software-project-planning.ppt
chapter--4-software-project-planning.ppt
 
Engage Usergroup 2024 - The Good The Bad_The Ugly
Engage Usergroup 2024 - The Good The Bad_The UglyEngage Usergroup 2024 - The Good The Bad_The Ugly
Engage Usergroup 2024 - The Good The Bad_The Ugly
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
 
EY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityEY_Graph Database Powered Sustainability
EY_Graph Database Powered Sustainability
 
Unit 1.1 Excite Part 1, class 9, cbse...
Unit 1.1 Excite Part 1, class 9, cbse...Unit 1.1 Excite Part 1, class 9, cbse...
Unit 1.1 Excite Part 1, class 9, cbse...
 
buds n tech IT solutions
buds n  tech IT                solutionsbuds n  tech IT                solutions
buds n tech IT solutions
 
Call Girls In Mukherjee Nagar 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
Call Girls In Mukherjee Nagar 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...Call Girls In Mukherjee Nagar 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
Call Girls In Mukherjee Nagar 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service Consultant
 

Page objects: the good, the bad, the ugly

  • 1. PAGE OBJECTS THE GOOD, THE BAD, AND THE UGLY
  • 2. WHO AM I? • DAWN CODE, INDESCRIBABLE! • COMP SCI DEGREE FROM CLEMSON, 2001 • TESTER -> PROGRAMMER -> TESTER • LIFELONG LEARNER • MACHINE LEARNER • CURRENTLY QUALITY ENGINEERING MANAGER AT IBM WATSON HEALTH CLINICAL DEVELOPMENT
  • 3. IS TEST AUTOMATION CODE REAL CODE? SHOULD AUTOMATION CODE BE WRITTEN FOLLOWING THE SAME CONVENTIONS AS PRODUCTION DEVELOPERS WRITING PRODUCTION CODE?
  • 5. DOES THAT MEAN WE SHOULD IGNORE ALL CLEAN CODING PRACTICES? OF COURSE NOT
  • 6. THE HAPPY MEDIUM • NO NEED TO GET INTO DEEP, TECHNICAL, PROGRAMMING CONCEPTS • ALSO WE DO NOT WANT TO END UP WITH A PROJECT THAT COSTS MORE TO MAINTAIN THAN IT IS WORTH TO EXECUTE • TESTERS CAN START WITH SOME SMALL PRACTICES THAT WORK TOWARD CLEAN, MAINTAINABLE, CODE
  • 7. MAKE CODE HUMAN READABLE • CODE IS READ BY HUMANS, NOT COMPUTERS • CODE SHOULD CONVEY INTENT • NAMES SHOULD BE MEANINGFUL • NAMES SHOULD NOT BE ABBREVIATED
  • 8.
  • 9. HOW COULD WE MODIFY THIS?
  • 11. DRY: DON’T REPEAT YOURSELF • IF YOU FIND THAT YOU DO IT MORE THAN ONCE, PULL IT OUT INTO A SEPARATE METHOD • IF YOU FIND THAT YOU ARE COPYING AND PASTING CODE, CONSIDER HOW MUCH YOU ARE REPEATING YOURSELF
  • 12. WHAT HAPPENS THE NEXT TIME WE WANT TO OPEN THAT EXCEL SPREADSHEET?
  • 13.
  • 14. WHAT ABOUT WHEN ANOTHER USER NEEDS TO PUT THEIR OWN PATH IN?
  • 15.
  • 16. WHAT ABOUT WHEN WE NEED TO INSERT A SHEET AS SHEET 1 IN THESE EXCEL FILES?
  • 17.
  • 19. CLEAN CODE FOR TESTERS • NAME ALL VALUES WITH MEANINGFUL, RELEVANT, HUMAN-READABLE NAMES • DON’T REPEAT YOURSELF
  • 20. GET STARTED WITH SELENIUM • HTTP://WWW.SELENIUMHQ.ORG/DOCS/03_WEBDRIVER.JSP
  • 21.
  • 22. IN THIS MODEL … https://udayhere.files.wordpress.com/2012/06/testautomation1.jpg
  • 23. WHAT DO WE INTEND TO MODEL?
  • 25.
  • 26. WHY USE PAGE OBJECTS? • CLEAN SEPARATION BETWEEN TEST CODE AND PAGE SPECIFIC CODE • REDUCE/REMOVE DUPLICATION FOR OBJECT LOCATION AND INTERACTION • TEST STEPS HAVE MORE MEANINGFUL NAMES ABOUT WHAT THE TEST IS ACTUALLY DOING
  • 27. PAGE OBJECT PATTERNS • GROWING PAGE OBJECTS ORGANICALLY • SELF-VERIFICATION • BUILT-IN NAVIGATION • NO ASSERTIONS IN THE PAGE OBJECT • PRIVATE ELEMENTS IN PAGE OBJECT
  • 28. WHAT GOES WRONG? • MOST OF IT IS ABOUT SCALING • FIRST: WHAT IS A “PAGE”, ANYWAY? • LARGE AND COMPLEX PAGE OBJECTS • NAVIGATION? • IT DOES REQUIRE HIGHER LEVEL OF PROGRAMMING KNOWLEDGE • PAGE OBJECT REPO IS HIGHLY APPLICATION SPECIFIC
  • 29. WHAT ARE YOUR EXPERIENCES?
  • 30. FOR FURTHER READING • WRITING MAINTAINABLE AUTOMATED TESTS, BY DALE EMERY • HTTPS://MARTINFOWLER.COM/BLIKI/PAGEOBJECT.HTML • HTTPS://GITHUB.COM/SELENIUMHQ/SELENIUM/WIKI/PAGEOBJECTS • HTTP://WWW.SELENIUMHQ.ORG/DOCS/06_TEST_DESIGN_CONSIDERATIONS.JSP