SlideShare une entreprise Scribd logo
1  sur  15
Télécharger pour lire hors ligne
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.

Contenu connexe

Tendances

CodeCamp 2012-mvc-vs-ror-2
CodeCamp 2012-mvc-vs-ror-2CodeCamp 2012-mvc-vs-ror-2
CodeCamp 2012-mvc-vs-ror-2
Amir Barylko
 
PRDC-ror-trilogy-part1
PRDC-ror-trilogy-part1PRDC-ror-trilogy-part1
PRDC-ror-trilogy-part1
Amir Barylko
 
Cpl12 continuous integration
Cpl12 continuous integrationCpl12 continuous integration
Cpl12 continuous integration
Amir Barylko
 
Rise of the hybrids
Rise of the hybridsRise of the hybrids
Rise of the hybrids
Oron Ben Zvi
 
WTF TDD?
WTF TDD?WTF TDD?
WTF TDD?
jeremyw
 

Tendances (14)

CodeCamp 2012-mvc-vs-ror-2
CodeCamp 2012-mvc-vs-ror-2CodeCamp 2012-mvc-vs-ror-2
CodeCamp 2012-mvc-vs-ror-2
 
PRDC-ror-trilogy-part1
PRDC-ror-trilogy-part1PRDC-ror-trilogy-part1
PRDC-ror-trilogy-part1
 
decoupling-ea
decoupling-eadecoupling-ea
decoupling-ea
 
CPL12-Agile-planning
CPL12-Agile-planningCPL12-Agile-planning
CPL12-Agile-planning
 
Cpl12 continuous integration
Cpl12 continuous integrationCpl12 continuous integration
Cpl12 continuous integration
 
YEG-UG-Capybara
YEG-UG-CapybaraYEG-UG-Capybara
YEG-UG-Capybara
 
Agile requirements
Agile requirementsAgile requirements
Agile requirements
 
Aki Salmi - Refactoring legacy code: a true story @ I T.A.K.E. Unconference 2...
Aki Salmi - Refactoring legacy code: a true story @ I T.A.K.E. Unconference 2...Aki Salmi - Refactoring legacy code: a true story @ I T.A.K.E. Unconference 2...
Aki Salmi - Refactoring legacy code: a true story @ I T.A.K.E. Unconference 2...
 
Agile planning
Agile planningAgile planning
Agile planning
 
PRDCW-avent-aggregator
PRDCW-avent-aggregatorPRDCW-avent-aggregator
PRDCW-avent-aggregator
 
Diy arduino
Diy arduinoDiy arduino
Diy arduino
 
Rise of the hybrids
Rise of the hybridsRise of the hybrids
Rise of the hybrids
 
WTF TDD?
WTF TDD?WTF TDD?
WTF TDD?
 
Owning Quality: The Culture of Empowerment at Riot Games
Owning Quality: The Culture of Empowerment at Riot GamesOwning Quality: The Culture of Empowerment at Riot Games
Owning Quality: The Culture of Empowerment at Riot Games
 

Similaire à Page-objects-pattern

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
 
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
 
SDEC10-Bdd-quality-driven
SDEC10-Bdd-quality-drivenSDEC10-Bdd-quality-driven
SDEC10-Bdd-quality-driven
Amir Barylko
 

Similaire à Page-objects-pattern (20)

DevTeach12-Capybara
DevTeach12-CapybaraDevTeach12-Capybara
DevTeach12-Capybara
 
Agile requirements
Agile requirementsAgile requirements
Agile requirements
 
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
 
2012 regina TC - 103 quality driven
2012 regina TC - 103 quality driven2012 regina TC - 103 quality driven
2012 regina TC - 103 quality driven
 
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
 
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
 
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
 
why-tdd
why-tddwhy-tdd
why-tdd
 
Hybrid Apps with Ionic Framework
Hybrid Apps with Ionic FrameworkHybrid Apps with Ionic Framework
Hybrid Apps with Ionic Framework
 
Getting your mobile test automation process in place - using Cucumber and Cal...
Getting your mobile test automation process in place - using Cucumber and Cal...Getting your mobile test automation process in place - using Cucumber and Cal...
Getting your mobile test automation process in place - using Cucumber and Cal...
 
Building Better Web Apps with Angular.js (SXSW 2014)
Building Better Web Apps with Angular.js (SXSW 2014)Building Better Web Apps with Angular.js (SXSW 2014)
Building Better Web Apps with Angular.js (SXSW 2014)
 
2012 regina TC - 101 welcome & resources
2012 regina TC - 101 welcome & resources2012 regina TC - 101 welcome & resources
2012 regina TC - 101 welcome & resources
 
SDEC10-Bdd-quality-driven
SDEC10-Bdd-quality-drivenSDEC10-Bdd-quality-driven
SDEC10-Bdd-quality-driven
 

Plus 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
 

Plus de Amir Barylko (20)

Functional converter project
Functional converter projectFunctional converter project
Functional converter project
 
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
 
No estimates
No estimatesNo estimates
No estimates
 
User stories deep dive
User stories deep diveUser stories deep dive
User stories deep dive
 
Coderetreat hosting training
Coderetreat hosting trainingCoderetreat hosting training
Coderetreat hosting training
 
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
 
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 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
 

Dernier

+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@
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 

Dernier (20)

Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
+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...
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
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
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of Brazil
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 

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.