0
AMIR BARYLKO                       PAGE OBJECTS                          PATTERN                   WINNIPEG RUBY USER GROU...
WHO AM I?  • Architect  • Developer  • Mentor  • Great      cook  • The     one who’s entertaining you for the next hour!A...
UI TESTING (BDD)Amir Barylko - Page Objects                MavenThought Inc.
WHAT’S THE POINT?  • Flush     out requirements  • Drive      development  • Traceability  • Documentation  • ????Amir Bar...
WHO CARES?  • The     Stakeholders  • The     Developers  • QAs  • BAs  • EtcAmir Barylko - Page Objects                Ma...
WHAT’S THE PROBLEM?  • New       approach  • It’s   quite a bit of effort  • Classic      roles may clash  • The     whole...
IMPLEMENTATIONAmir 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 d...
STEPS  When /^I have some projects loaded$/ do     # setup the projects you have  end  Then /^I should have the complete l...
COMMON STRUCTURE        Step                  Cucumber            Implementation   Arrange            Given I have....    ...
LOOK MA! NO TAGS!  • How       to avoid brittle tests?  • What       do we do in general when coding?  • Reusability.... p...
LOOK MA! NO SLIDES!   unless boring || stef.still_talking? do       demo()   endAmir Barylko - Page Objects         MavenT...
QUESTIONS?Amir Barylko - Page Objects                MavenThought Inc.
RESOURCES  • Email: amir@barylko.com,  • Twitter: @abarylko  • Blog: http://orthocoders.com  • Materials: http://orthocode...
RESOURCES II  • PoP: http://code.google.com/p/selenium/wiki/PageObjects  • Gizmo: https://github.com/icaruswings/gizmo  • ...
Upcoming SlideShare
Loading in...5
×

Page-objects-pattern

566

Published on

Presentation done at Ruby USer group

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
566
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
8
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Transcript of "Page-objects-pattern"

  1. 1. AMIR BARYLKO PAGE OBJECTS PATTERN WINNIPEG RUBY USER GROUP FEB 2012Amir Barylko - Page Objects MavenThought Inc.
  2. 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. 3. UI TESTING (BDD)Amir Barylko - Page Objects MavenThought Inc.
  4. 4. WHAT’S THE POINT? • Flush out requirements • Drive development • Traceability • Documentation • ????Amir Barylko - Page Objects MavenThought Inc.
  5. 5. WHO CARES? • The Stakeholders • The Developers • QAs • BAs • EtcAmir Barylko - Page Objects MavenThought Inc.
  6. 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 changesAmir Barylko - Page Objects MavenThought Inc.
  7. 7. IMPLEMENTATIONAmir Barylko - Page Objects MavenThought Inc.
  8. 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 Im logged in And I have some projects loaded When I go to the projects page Then I should the complete list of projectsAmir Barylko - Page Objects MavenThought Inc.
  9. 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 endAmir Barylko - Page Objects MavenThought Inc.
  10. 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. 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. 12. LOOK MA! NO SLIDES! unless boring || stef.still_talking? do demo() endAmir Barylko - Page Objects MavenThought Inc.
  13. 13. QUESTIONS?Amir Barylko - Page Objects MavenThought Inc.
  14. 14. RESOURCES • Email: amir@barylko.com, • Twitter: @abarylko • Blog: http://orthocoders.com • Materials: http://orthocoders.com/presentations • Website: http://maventhought.comAmir Barylko - Page Objects MavenThought Inc.
  15. 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.orgAmir Barylko - Page Objects MavenThought Inc.
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×