SlideShare uma empresa Scribd logo
1 de 15
Baixar para ler offline
AMIR BARYLKO
                       PAGE OBJECTS
                          PATTERN


                   WINNIPEG RUBY USER GROUP
                              FEB 2012


Amir Barylko - Page Objects                   MavenThought Inc.
WHO AM I?

  • Architect

  • Developer

  • Mentor

  • Great      cook

  • The     one who’s entertaining you for the next hour!


Amir Barylko - Page Objects                                 MavenThought Inc.
UI TESTING (BDD)




Amir Barylko - Page Objects                MavenThought Inc.
WHAT’S THE POINT?

  • Flush     out requirements

  • Drive      development

  • Traceability

  • Documentation

  • ????



Amir Barylko - Page Objects            MavenThought Inc.
WHO CARES?

  • The     Stakeholders

  • The     Developers

  • QAs

  • BAs

  • Etc



Amir Barylko - Page Objects                MavenThought Inc.
WHAT’S THE PROBLEM?

  • New       approach

  • It’s   quite a bit of effort

  • Classic      roles may clash

  • The     whole team needs to buy in

  • Implementation            changes may imply test changes


Amir Barylko - Page Objects                                    MavenThought Inc.
IMPLEMENTATION




Amir Barylko - Page Objects             MavenThought Inc.
FEATURES

  Feature: Listing projects
    As a user
    I Want to see the list of projects
    So I can choose one to see the details
      Scenario: List all projects
        Given I'm logged in
        And   I have some projects loaded
        When I go to the projects page
        Then I should the complete list of projects



Amir Barylko - Page Objects                     MavenThought Inc.
STEPS
  When /^I have some projects loaded$/ do
     # setup the projects you have
  end


  Then /^I should have the complete list of projects$/ do
     # some cool ruby code here to
     # verify that what you are seeing is what you
     # actually have in the database
  end




Amir Barylko - Page Objects                                 MavenThought Inc.
COMMON STRUCTURE

        Step                  Cucumber            Implementation


   Arrange            Given I have....       Put some stuff in the DB

                                               Click, enter values,
        Act           When I do this...
                                                  more clicking

     Assert           Then I should see...        DB == HTML?

Amir Barylko - Page Objects                                   MavenThought Inc.
LOOK MA! NO TAGS!

  • How       to avoid brittle tests?

  • What       do we do in general when coding?

  • Reusability.... perhaps?

  • Less     coupling, maybe?

  • How? Where?



Amir Barylko - Page Objects                       MavenThought Inc.
LOOK MA! NO SLIDES!

   unless boring || stef.still_talking? do
       demo()
   end




Amir Barylko - Page Objects         MavenThought Inc.
QUESTIONS?




Amir Barylko - Page Objects                MavenThought Inc.
RESOURCES

  • Email: amir@barylko.com,

  • Twitter: @abarylko

  • Blog: http://orthocoders.com

  • Materials: http://orthocoders.com/presentations

  • Website: http://maventhought.com



Amir Barylko - Page Objects                    MavenThought Inc.
RESOURCES II

  • PoP: http://code.google.com/p/selenium/wiki/PageObjects

  • Gizmo: https://github.com/icaruswings/gizmo

  • Example1: https://github.com/cheezy/uitesting_blog

  • Capybara: https://github.com/jnicklas/capybara

  • Cucumber: https://cucumber.org



Amir Barylko - Page Objects                              MavenThought Inc.

Mais conteúdo relacionado

Destaque (6)

Coderetreat hosting training
Coderetreat hosting trainingCoderetreat hosting training
Coderetreat hosting training
 
No estimates
No estimatesNo estimates
No estimates
 
User stories deep dive
User stories deep diveUser stories deep dive
User stories deep dive
 
Elm: delightful web development
Elm: delightful web developmentElm: delightful web development
Elm: delightful web development
 
Dot Net Core
Dot Net CoreDot Net Core
Dot Net Core
 
There's no charge for (functional) awesomeness
There's no charge for (functional) awesomenessThere's no charge for (functional) awesomeness
There's no charge for (functional) awesomeness
 

Semelhante a Page objects pattern

Open source libraries and tools
Open source libraries and toolsOpen source libraries and tools
Open source libraries and tools
Amir Barylko
 
Cpl12 continuous integration
Cpl12 continuous integrationCpl12 continuous integration
Cpl12 continuous integration
Amir Barylko
 
Rich UI with Knockout.js & Coffeescript
Rich UI with Knockout.js & CoffeescriptRich UI with Knockout.js & Coffeescript
Rich UI with Knockout.js & Coffeescript
Amir Barylko
 
Quality web-acceptance
Quality web-acceptanceQuality web-acceptance
Quality web-acceptance
Amir Barylko
 
Code camp 2012-advanced-design-patterns
Code camp 2012-advanced-design-patternsCode camp 2012-advanced-design-patterns
Code camp 2012-advanced-design-patterns
Amir Barylko
 

Semelhante a Page objects pattern (20)

Open source libraries and tools
Open source libraries and toolsOpen source libraries and tools
Open source libraries and tools
 
DevTeach12-Capybara
DevTeach12-CapybaraDevTeach12-Capybara
DevTeach12-Capybara
 
Agile requirements
Agile requirementsAgile requirements
Agile requirements
 
Cpl12 continuous integration
Cpl12 continuous integrationCpl12 continuous integration
Cpl12 continuous integration
 
Capybara1
Capybara1Capybara1
Capybara1
 
Rich UI with Knockout.js & Coffeescript
Rich UI with Knockout.js & CoffeescriptRich UI with Knockout.js & Coffeescript
Rich UI with Knockout.js & Coffeescript
 
PRDC12 advanced design patterns
PRDC12 advanced design patternsPRDC12 advanced design patterns
PRDC12 advanced design patterns
 
CPL12-Agile-planning
CPL12-Agile-planningCPL12-Agile-planning
CPL12-Agile-planning
 
2012 regina TC - 103 quality driven
2012 regina TC - 103 quality driven2012 regina TC - 103 quality driven
2012 regina TC - 103 quality driven
 
Quality web-acceptance
Quality web-acceptanceQuality web-acceptance
Quality web-acceptance
 
YEG-Agile-planning
YEG-Agile-planningYEG-Agile-planning
YEG-Agile-planning
 
Code camp 2012-advanced-design-patterns
Code camp 2012-advanced-design-patternsCode camp 2012-advanced-design-patterns
Code camp 2012-advanced-design-patterns
 
DevTeach12-betterspecs
DevTeach12-betterspecsDevTeach12-betterspecs
DevTeach12-betterspecs
 
PRDCW-advanced-design-patterns
PRDCW-advanced-design-patternsPRDCW-advanced-design-patterns
PRDCW-advanced-design-patterns
 
PRDCW-avent-aggregator
PRDCW-avent-aggregatorPRDCW-avent-aggregator
PRDCW-avent-aggregator
 
A baryklo design-patterns
A baryklo design-patternsA baryklo design-patterns
A baryklo design-patterns
 
sdec11-Advanced-design-patterns
sdec11-Advanced-design-patternssdec11-Advanced-design-patterns
sdec11-Advanced-design-patterns
 
Agile planning
Agile planningAgile planning
Agile planning
 
Nuget
NugetNuget
Nuget
 
Automated UI test on mobile - with Cucumber/Calabash
Automated UI test on mobile - with Cucumber/CalabashAutomated UI test on mobile - with Cucumber/Calabash
Automated UI test on mobile - with Cucumber/Calabash
 

Mais de Amir Barylko

Beutiful javascript with coffeescript
Beutiful javascript with coffeescriptBeutiful javascript with coffeescript
Beutiful javascript with coffeescript
Amir Barylko
 
Beutiful javascript with coffeescript
Beutiful javascript with coffeescriptBeutiful javascript with coffeescript
Beutiful javascript with coffeescript
Amir Barylko
 

Mais de Amir Barylko (17)

Functional converter project
Functional converter projectFunctional converter project
Functional converter project
 
What's new in c# 6
What's new in c# 6What's new in c# 6
What's new in c# 6
 
Productive teams
Productive teamsProductive teams
Productive teams
 
Who killed object oriented design?
Who killed object oriented design?Who killed object oriented design?
Who killed object oriented design?
 
From coach to owner - What I learned from the other side
From coach to owner - What I learned from the other sideFrom coach to owner - What I learned from the other side
From coach to owner - What I learned from the other side
 
Communication is the Key to Teamwork and productivity
Communication is the Key to Teamwork and productivityCommunication is the Key to Teamwork and productivity
Communication is the Key to Teamwork and productivity
 
Acceptance Test Driven Development
Acceptance Test Driven DevelopmentAcceptance Test Driven Development
Acceptance Test Driven Development
 
Refactoring
RefactoringRefactoring
Refactoring
 
Agile requirements
Agile requirementsAgile requirements
Agile requirements
 
Agile teams and responsibilities
Agile teams and responsibilitiesAgile teams and responsibilities
Agile teams and responsibilities
 
Refactoring
RefactoringRefactoring
Refactoring
 
Beutiful javascript with coffeescript
Beutiful javascript with coffeescriptBeutiful javascript with coffeescript
Beutiful javascript with coffeescript
 
Sass & bootstrap
Sass & bootstrapSass & bootstrap
Sass & bootstrap
 
SDEC12 Beautiful javascript with coffeescript
SDEC12 Beautiful javascript with coffeescriptSDEC12 Beautiful javascript with coffeescript
SDEC12 Beautiful javascript with coffeescript
 
Beutiful javascript with coffeescript
Beutiful javascript with coffeescriptBeutiful javascript with coffeescript
Beutiful javascript with coffeescript
 
Awesome html with ujs, jQuery and coffeescript
Awesome html with ujs, jQuery and coffeescriptAwesome html with ujs, jQuery and coffeescript
Awesome html with ujs, jQuery and coffeescript
 
Teams and responsibilities
Teams and responsibilitiesTeams and responsibilities
Teams and responsibilities
 

Último

+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 

Último (20)

Spring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUKSpring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
JohnPollard-hybrid-app-RailsConf2024.pptx
JohnPollard-hybrid-app-RailsConf2024.pptxJohnPollard-hybrid-app-RailsConf2024.pptx
JohnPollard-hybrid-app-RailsConf2024.pptx
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
Introduction to use of FHIR Documents in ABDM
Introduction to use of FHIR Documents in ABDMIntroduction to use of FHIR Documents in ABDM
Introduction to use of FHIR Documents in ABDM
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
Vector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxVector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptx
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 

Page objects pattern

  • 1. AMIR BARYLKO PAGE OBJECTS PATTERN WINNIPEG RUBY USER GROUP FEB 2012 Amir Barylko - Page Objects MavenThought Inc.
  • 2. WHO AM I? • Architect • Developer • Mentor • Great cook • The one who’s entertaining you for the next hour! Amir Barylko - Page Objects MavenThought Inc.
  • 3. UI TESTING (BDD) Amir Barylko - Page Objects MavenThought Inc.
  • 4. WHAT’S THE POINT? • Flush out requirements • Drive development • Traceability • Documentation • ???? Amir Barylko - Page Objects MavenThought Inc.
  • 5. WHO CARES? • The Stakeholders • The Developers • QAs • BAs • Etc Amir Barylko - Page Objects MavenThought Inc.
  • 6. WHAT’S THE PROBLEM? • New approach • It’s quite a bit of effort • Classic roles may clash • The whole team needs to buy in • Implementation changes may imply test changes Amir Barylko - Page Objects MavenThought Inc.
  • 7. IMPLEMENTATION Amir Barylko - Page Objects MavenThought Inc.
  • 8. FEATURES Feature: Listing projects As a user I Want to see the list of projects So I can choose one to see the details Scenario: List all projects Given I'm logged in And I have some projects loaded When I go to the projects page Then I should the complete list of projects Amir Barylko - Page Objects MavenThought Inc.
  • 9. STEPS When /^I have some projects loaded$/ do # setup the projects you have end Then /^I should have the complete list of projects$/ do # some cool ruby code here to # verify that what you are seeing is what you # actually have in the database end Amir Barylko - Page Objects MavenThought Inc.
  • 10. COMMON STRUCTURE Step Cucumber Implementation Arrange Given I have.... Put some stuff in the DB Click, enter values, Act When I do this... more clicking Assert Then I should see... DB == HTML? Amir Barylko - Page Objects MavenThought Inc.
  • 11. LOOK MA! NO TAGS! • How to avoid brittle tests? • What do we do in general when coding? • Reusability.... perhaps? • Less coupling, maybe? • How? Where? Amir Barylko - Page Objects MavenThought Inc.
  • 12. LOOK MA! NO SLIDES! unless boring || stef.still_talking? do demo() end Amir Barylko - Page Objects MavenThought Inc.
  • 13. QUESTIONS? Amir Barylko - Page Objects MavenThought Inc.
  • 14. RESOURCES • Email: amir@barylko.com, • Twitter: @abarylko • Blog: http://orthocoders.com • Materials: http://orthocoders.com/presentations • Website: http://maventhought.com Amir Barylko - Page Objects MavenThought Inc.
  • 15. RESOURCES II • PoP: http://code.google.com/p/selenium/wiki/PageObjects • Gizmo: https://github.com/icaruswings/gizmo • Example1: https://github.com/cheezy/uitesting_blog • Capybara: https://github.com/jnicklas/capybara • Cucumber: https://cucumber.org Amir Barylko - Page Objects MavenThought Inc.