SlideShare une entreprise Scribd logo
1  sur  85
Télécharger pour lire hors ligne
The Testable Web
       by Dave Haeffner
       Prepared for the NYC Web Design Meetup
       March 11, 2013




Saturday, March 16, 13
The Motley Fool




                         To Educate, Amuse, and Enrich

Saturday, March 16, 13
Arrgyle




                         Navigate The High Tech Seas

Saturday, March 16, 13
Saturday, March 16, 13
Saturday, March 16, 13
Saturday, March 16, 13
How many of you work on web things?
               (e.g. websites, web applications, mobile apps)




Saturday, March 16, 13
How many of you test what you build?
                    (or have someone on your team who does)




Saturday, March 16, 13
How many of you primarily test manually?




Saturday, March 16, 13
How many of you primarily with automation?




Saturday, March 16, 13
How many of you test with a mix of both?




Saturday, March 16, 13
How many of you don’t test?




Saturday, March 16, 13
Show of hands if any of these are true for you:

         Save testing for the end of the cycle
         Feel like there isn’t enough time to adequately test
         Feel unnerved when it’s time to release
         Find issues in production




Saturday, March 16, 13
The Dirty Little Secrets of Testing




Saturday, March 16, 13
#1: You don’t have to test everything




Saturday, March 16, 13
Pareto Analysis




Saturday, March 16, 13
Saturday, March 16, 13
#2: Everything You Need to know about testing,
                      you learned in Kindegarten.




Saturday, March 16, 13
Finding the Glitter Glue Path




Saturday, March 16, 13
Saturday, March 16, 13
Questions worth asking,
                         to help you find your glitter glue path




Saturday, March 16, 13
How does your business*
                           make make money/deliver value?




                         * the business you are building software for
Saturday, March 16, 13
How do the users actually use it?




Saturday, March 16, 13
What are the prominent/relevant traits of your users
        (e.g. browser types, geographic location, etc.)?




Saturday, March 16, 13
What things have bitten you before?




Saturday, March 16, 13
“An example would be handy right about now”
                            - Brian Marick




Saturday, March 16, 13
Saturday, March 16, 13
7 Automated Acceptance Tests*
                           Successful platform upgrade




Saturday, March 16, 13
Saturday, March 16, 13
Saturday, March 16, 13
The Motley Fool




                         To Educate, Amuse, and Enrich

Saturday, March 16, 13
These things can take time.

        You have my permission to try until you get it right.




Saturday, March 16, 13
ext




Saturday, March 16, 13
When To Automate?
                         Questions worth asking




Saturday, March 16, 13
How long will it take to test manually?




Saturday, March 16, 13
How long will it take to test manually?

    This will help you get a baseline before answering the
                      following questions.




Saturday, March 16, 13
How often will this functionality need to be checked?




Saturday, March 16, 13
How often will this functionality need to be checked?

If often, then it is likely a good candidate for automation.




Saturday, March 16, 13
Is it valuable (e.g. core functionality, used heavily, a legal
                  or political requirement)?




Saturday, March 16, 13
Is it valuable (e.g. core functionality, used heavily, a legal
                  or political requirement)?

    If yes, then it is very likely a candidate for automation.




Saturday, March 16, 13
How risky is the feature (e.g. fundamental changes,
        complex architecture, large user facing impact)?




Saturday, March 16, 13
How risky is the feature (e.g. fundamental changes,
        complex architecture, large user facing impact)?

                            High? Medium? Or Low?

                         If Medium to High, then maybe.




Saturday, March 16, 13
What is the level of effort to automate?




Saturday, March 16, 13
What is the level of effort to automate?

                             T-shirt sizing will help you here:
                                     Small: 0-2 hours
                                    Medium: 1-2 days
                                      Large: 2-4 days
                                    X-Large >= 1 week

                             If large or higher, probably not

                               But it really depends
                    on what other work you have committed to

Saturday, March 16, 13
Does it involve look and feel?




Saturday, March 16, 13
Does it involve look and feel?

 If so, then it is likely a ripe candidate for manual testing.




Saturday, March 16, 13
How To Automate (strategy)?




Saturday, March 16, 13
http://martinfowler.com/bliki/TestPyramid.html
Saturday, March 16, 13
Build a feedback loop

                         (Version Control are table stakes)




Saturday, March 16, 13
Version Control System (VCS)




Saturday, March 16, 13
Continuous Integration (CI)




Saturday, March 16, 13
How to Automate (tactics)?




Saturday, March 16, 13
Choose your weapon




Saturday, March 16, 13
Consider Your Current Tech Stack




Saturday, March 16, 13
Then Layer In Your Team’s Context
      (strengths, comfort, confidence, excitement/interest)




Saturday, March 16, 13
Programming Language?

    Doesn’t have to be the same as what you develop in.




Saturday, March 16, 13
Who will own this?




Saturday, March 16, 13
Open Source Testing Tools




Saturday, March 16, 13
Agile Alliance Functional Testing Tool group
                              http://bit.ly/AgileTestTools




Saturday, March 16, 13
But let’s assume UI is involved.

                         In that case, something with WebDriver.




Saturday, March 16, 13
Full Disclosure: I have some opinions on this

          Released an open-source web testing framework
                      for Selenium WebDriver

http://arrgyle.com/blog/automated-web-testing-is-hard/




Saturday, March 16, 13
World’s Quickest Overview on how Selenium works




Saturday, March 16, 13
Selenium...

       is a robot sent from the future to help us test web
       sites

       uses locators (id, name, link, css, xpath, etc.) to
       interact with the html elements of the page (a.k.a
       ‘find by strategy’)

                               ------

           The simplest and most sustainable way is to use
                          straight up CSS.
Saturday, March 16, 13
How to build UI tests so you won’t hate yourself




Saturday, March 16, 13
Santi says...




Saturday, March 16, 13
Record & Playback is merely a stepping stone
                             Export your tests
                           Treat them like code
                           Page Object Pattern




Saturday, March 16, 13
He also says:
                         Only use UI tests when you have to...




Saturday, March 16, 13
But won’t they be slow?




Saturday, March 16, 13
Saturday, March 16, 13
Saturday, March 16, 13
In Practice




Saturday, March 16, 13
Test Pack 1    Test Pack 2
                         VCS   CI
                                    Simple checks   Automated
                                       Builds,      Acceptance
                                      Unit Tests       Tests


   Local Dev




Saturday, March 16, 13
Garbage In, Garbage Out




Saturday, March 16, 13
A more testable UI




Saturday, March 16, 13
More semantic markup
                         (e.g. unique and descriptive locators)




Saturday, March 16, 13
Inventory and consolidate your design patterns




Saturday, March 16, 13
But really, it’s about usability




Saturday, March 16, 13
“The more people think about usability, the more
              things tend to work out. It's a virtuous path.”

                 - Ken Pier, Senior Director of Product Quality,
                                   Socialtext




Saturday, March 16, 13
“It’s only words and photos on the internet.”

              - John F. Croston III, Web Content Accessibility
               Manager for the United States Army (army.mil)




Saturday, March 16, 13
Outro




Saturday, March 16, 13
Recap

       • You Don’t Have To Test Everything


       • But do test, intelligently, asking yourself


             • What matters?


             • Should I automate this?


       • Choose a toolchain that’s right for you and your team


       • Build a feedback loop


       • Build a more descriptive, usable, and testable web


Saturday, March 16, 13
I’m writing a book about this stuff!

                              arrgyle.com/book



                         @TourDeDave                    dave@arrgyle.com
Saturday, March 16, 13
Appendix




Saturday, March 16, 13
• A practical guide to usability: http://jfciii.com/presentations/wasp/
         accessibility.html



       • How to address risk in Agile (view it like an investment portfolio): http://
         arrgyle.com/blog/agile-accounting/



       • Automated Web Testing Is Hard (Introducing ChemistryKit, an open source
         testing framework to make automated web testing easier): http://arrgyle.com/
         blog/automated-web-testing-is-hard/



       • CSS Selectors in Selenium: http://sauceio.com/index.php/2010/01/selenium-
         totw-css-selectors-in-selenium-demystified/



       • Locators in Selenium http://marakana.com/bookshelf/selenium_tutorial/
         locators.html



Saturday, March 16, 13
• Page Objects in Selenium: https://code.google.com/p/selenium/wiki/
         PageObjects



       • Page Objects Ruby Gem: https://github.com/cheezy/page-object




Saturday, March 16, 13

Contenu connexe

En vedette

How To Use Selenium Successfully
How To Use Selenium SuccessfullyHow To Use Selenium Successfully
How To Use Selenium SuccessfullyDave Haeffner
 
Selenium Tips & Tricks, presented at the Tel Aviv Selenium Meetup
Selenium Tips & Tricks, presented at the Tel Aviv Selenium MeetupSelenium Tips & Tricks, presented at the Tel Aviv Selenium Meetup
Selenium Tips & Tricks, presented at the Tel Aviv Selenium MeetupDave Haeffner
 
Agile testing for mere mortals
Agile testing for mere mortalsAgile testing for mere mortals
Agile testing for mere mortalsDave Haeffner
 
Selenium Users Anonymous
Selenium Users AnonymousSelenium Users Anonymous
Selenium Users AnonymousDave Haeffner
 
Cucumber Crash Course
Cucumber Crash CourseCucumber Crash Course
Cucumber Crash CourseDave Haeffner
 
Open Source Investing
Open Source InvestingOpen Source Investing
Open Source InvestingDave Haeffner
 
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)Dave Haeffner
 
Continuous Testing Meets the Classroom at Code.org
Continuous Testing Meets the Classroom at Code.orgContinuous Testing Meets the Classroom at Code.org
Continuous Testing Meets the Classroom at Code.orgSauce Labs
 
Web testing with Selenium
Web testing with SeleniumWeb testing with Selenium
Web testing with SeleniumXBOSoft
 
Pivotal Failure - Lessons Learned from Lean Startup Machine DC
Pivotal Failure - Lessons Learned from Lean Startup Machine DCPivotal Failure - Lessons Learned from Lean Startup Machine DC
Pivotal Failure - Lessons Learned from Lean Startup Machine DCDave Haeffner
 
You do not need automation engineer - Sqa Days - 2015 - EN
You do not need automation engineer  - Sqa Days - 2015 - ENYou do not need automation engineer  - Sqa Days - 2015 - EN
You do not need automation engineer - Sqa Days - 2015 - ENIakiv Kramarenko
 
Web ui tests examples with selenide, nselene, selene & capybara
Web ui tests examples with  selenide, nselene, selene & capybaraWeb ui tests examples with  selenide, nselene, selene & capybara
Web ui tests examples with selenide, nselene, selene & capybaraIakiv Kramarenko
 
Cross Platform Appium Tests: How To
Cross Platform Appium Tests: How ToCross Platform Appium Tests: How To
Cross Platform Appium Tests: How ToGlobalLogic Ukraine
 
Polyglot automation - QA Fest - 2015
Polyglot automation - QA Fest - 2015Polyglot automation - QA Fest - 2015
Polyglot automation - QA Fest - 2015Iakiv Kramarenko
 
Three Simple Chords of Alternative PageObjects and Hardcore of LoadableCompon...
Three Simple Chords of Alternative PageObjects and Hardcore of LoadableCompon...Three Simple Chords of Alternative PageObjects and Hardcore of LoadableCompon...
Three Simple Chords of Alternative PageObjects and Hardcore of LoadableCompon...Iakiv Kramarenko
 
Write Selenide in Python 15 min
Write Selenide in Python 15 minWrite Selenide in Python 15 min
Write Selenide in Python 15 minIakiv Kramarenko
 

En vedette (20)

How To Use Selenium Successfully
How To Use Selenium SuccessfullyHow To Use Selenium Successfully
How To Use Selenium Successfully
 
Selenium Tips & Tricks, presented at the Tel Aviv Selenium Meetup
Selenium Tips & Tricks, presented at the Tel Aviv Selenium MeetupSelenium Tips & Tricks, presented at the Tel Aviv Selenium Meetup
Selenium Tips & Tricks, presented at the Tel Aviv Selenium Meetup
 
Agile testing for mere mortals
Agile testing for mere mortalsAgile testing for mere mortals
Agile testing for mere mortals
 
Selenium Basics
Selenium BasicsSelenium Basics
Selenium Basics
 
Selenium Users Anonymous
Selenium Users AnonymousSelenium Users Anonymous
Selenium Users Anonymous
 
Cucumber Crash Course
Cucumber Crash CourseCucumber Crash Course
Cucumber Crash Course
 
Open Source Investing
Open Source InvestingOpen Source Investing
Open Source Investing
 
Selenium Frameworks
Selenium FrameworksSelenium Frameworks
Selenium Frameworks
 
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)
 
Selenium
SeleniumSelenium
Selenium
 
Continuous Testing Meets the Classroom at Code.org
Continuous Testing Meets the Classroom at Code.orgContinuous Testing Meets the Classroom at Code.org
Continuous Testing Meets the Classroom at Code.org
 
Web testing with Selenium
Web testing with SeleniumWeb testing with Selenium
Web testing with Selenium
 
Pivotal Failure - Lessons Learned from Lean Startup Machine DC
Pivotal Failure - Lessons Learned from Lean Startup Machine DCPivotal Failure - Lessons Learned from Lean Startup Machine DC
Pivotal Failure - Lessons Learned from Lean Startup Machine DC
 
KISS Automation.py
KISS Automation.pyKISS Automation.py
KISS Automation.py
 
You do not need automation engineer - Sqa Days - 2015 - EN
You do not need automation engineer  - Sqa Days - 2015 - ENYou do not need automation engineer  - Sqa Days - 2015 - EN
You do not need automation engineer - Sqa Days - 2015 - EN
 
Web ui tests examples with selenide, nselene, selene & capybara
Web ui tests examples with  selenide, nselene, selene & capybaraWeb ui tests examples with  selenide, nselene, selene & capybara
Web ui tests examples with selenide, nselene, selene & capybara
 
Cross Platform Appium Tests: How To
Cross Platform Appium Tests: How ToCross Platform Appium Tests: How To
Cross Platform Appium Tests: How To
 
Polyglot automation - QA Fest - 2015
Polyglot automation - QA Fest - 2015Polyglot automation - QA Fest - 2015
Polyglot automation - QA Fest - 2015
 
Three Simple Chords of Alternative PageObjects and Hardcore of LoadableCompon...
Three Simple Chords of Alternative PageObjects and Hardcore of LoadableCompon...Three Simple Chords of Alternative PageObjects and Hardcore of LoadableCompon...
Three Simple Chords of Alternative PageObjects and Hardcore of LoadableCompon...
 
Write Selenide in Python 15 min
Write Selenide in Python 15 minWrite Selenide in Python 15 min
Write Selenide in Python 15 min
 

Similaire à The Testable Web

Intellectual property basics
Intellectual property basicsIntellectual property basics
Intellectual property basicsKrista Kennedy
 
Applying Evolutionary Architecture on a Popular API
Applying Evolutionary Architecture on a  Popular APIApplying Evolutionary Architecture on a  Popular API
Applying Evolutionary Architecture on a Popular APIPhil Calçado
 
Ruby como-lenguaje-de-programacion
Ruby como-lenguaje-de-programacionRuby como-lenguaje-de-programacion
Ruby como-lenguaje-de-programacionEmmanuel Delgado
 
The Future is Responsive
The Future is ResponsiveThe Future is Responsive
The Future is ResponsiveJonathan Smiley
 
Structuring apps in Scala
Structuring apps in ScalaStructuring apps in Scala
Structuring apps in ScalaPhil Calçado
 
Big Data Is Not the Insight: The Language Of Discovery:
Big Data Is Not the Insight: The Language Of Discovery: Big Data Is Not the Insight: The Language Of Discovery:
Big Data Is Not the Insight: The Language Of Discovery: Joe Lamantia
 
Less Alarming Alerts - SRECon 2016
Less Alarming Alerts - SRECon 2016 Less Alarming Alerts - SRECon 2016
Less Alarming Alerts - SRECon 2016 Robert Treat
 
Android DevCon 2013 Usability
Android DevCon 2013 UsabilityAndroid DevCon 2013 Usability
Android DevCon 2013 Usabilitygravityswitch
 
TDD at Smartbear
TDD at SmartbearTDD at Smartbear
TDD at Smartbearfroderik
 
Lean UX is Haaaard
Lean UX is HaaaardLean UX is Haaaard
Lean UX is HaaaardZac Halbert
 
Cleanweb uk worthing
Cleanweb uk worthingCleanweb uk worthing
Cleanweb uk worthingCleanweb UK
 
MotherCoders Week 3 - The Internet of Things
MotherCoders Week 3 - The Internet of ThingsMotherCoders Week 3 - The Internet of Things
MotherCoders Week 3 - The Internet of ThingsMotherCoders
 
Making your oss project more like rails
Making your oss project more like railsMaking your oss project more like rails
Making your oss project more like railsYehuda Katz
 
Unmoderated User Testing
Unmoderated User TestingUnmoderated User Testing
Unmoderated User TestingZURB
 

Similaire à The Testable Web (20)

Testable Code ... In Joomla!?
Testable Code ... In Joomla!?Testable Code ... In Joomla!?
Testable Code ... In Joomla!?
 
Intellectual property basics
Intellectual property basicsIntellectual property basics
Intellectual property basics
 
Applying Evolutionary Architecture on a Popular API
Applying Evolutionary Architecture on a  Popular APIApplying Evolutionary Architecture on a  Popular API
Applying Evolutionary Architecture on a Popular API
 
Ruby como-lenguaje-de-programacion
Ruby como-lenguaje-de-programacionRuby como-lenguaje-de-programacion
Ruby como-lenguaje-de-programacion
 
The Future is Responsive
The Future is ResponsiveThe Future is Responsive
The Future is Responsive
 
Fed2013_Managing Workplace Productivity
Fed2013_Managing Workplace ProductivityFed2013_Managing Workplace Productivity
Fed2013_Managing Workplace Productivity
 
Structuring apps in Scala
Structuring apps in ScalaStructuring apps in Scala
Structuring apps in Scala
 
Why isn't my lap top intelligent ?
Why isn't my lap top intelligent ?Why isn't my lap top intelligent ?
Why isn't my lap top intelligent ?
 
Big Data Is Not the Insight: The Language Of Discovery:
Big Data Is Not the Insight: The Language Of Discovery: Big Data Is Not the Insight: The Language Of Discovery:
Big Data Is Not the Insight: The Language Of Discovery:
 
Bold schools ascd13
Bold schools ascd13Bold schools ascd13
Bold schools ascd13
 
Less Alarming Alerts - SRECon 2016
Less Alarming Alerts - SRECon 2016 Less Alarming Alerts - SRECon 2016
Less Alarming Alerts - SRECon 2016
 
Android DevCon 2013 Usability
Android DevCon 2013 UsabilityAndroid DevCon 2013 Usability
Android DevCon 2013 Usability
 
TDD at Smartbear
TDD at SmartbearTDD at Smartbear
TDD at Smartbear
 
WRT 427: Introduction
WRT 427: IntroductionWRT 427: Introduction
WRT 427: Introduction
 
Lean UX is Haaaard
Lean UX is HaaaardLean UX is Haaaard
Lean UX is Haaaard
 
Cleanweb uk worthing
Cleanweb uk worthingCleanweb uk worthing
Cleanweb uk worthing
 
MotherCoders Week 3 - The Internet of Things
MotherCoders Week 3 - The Internet of ThingsMotherCoders Week 3 - The Internet of Things
MotherCoders Week 3 - The Internet of Things
 
Making your oss project more like rails
Making your oss project more like railsMaking your oss project more like rails
Making your oss project more like rails
 
Engine on Rails
Engine on RailsEngine on Rails
Engine on Rails
 
Unmoderated User Testing
Unmoderated User TestingUnmoderated User Testing
Unmoderated User Testing
 

The Testable Web

  • 1. The Testable Web by Dave Haeffner Prepared for the NYC Web Design Meetup March 11, 2013 Saturday, March 16, 13
  • 2. The Motley Fool To Educate, Amuse, and Enrich Saturday, March 16, 13
  • 3. Arrgyle Navigate The High Tech Seas Saturday, March 16, 13
  • 7. How many of you work on web things? (e.g. websites, web applications, mobile apps) Saturday, March 16, 13
  • 8. How many of you test what you build? (or have someone on your team who does) Saturday, March 16, 13
  • 9. How many of you primarily test manually? Saturday, March 16, 13
  • 10. How many of you primarily with automation? Saturday, March 16, 13
  • 11. How many of you test with a mix of both? Saturday, March 16, 13
  • 12. How many of you don’t test? Saturday, March 16, 13
  • 13. Show of hands if any of these are true for you: Save testing for the end of the cycle Feel like there isn’t enough time to adequately test Feel unnerved when it’s time to release Find issues in production Saturday, March 16, 13
  • 14. The Dirty Little Secrets of Testing Saturday, March 16, 13
  • 15. #1: You don’t have to test everything Saturday, March 16, 13
  • 18. #2: Everything You Need to know about testing, you learned in Kindegarten. Saturday, March 16, 13
  • 19. Finding the Glitter Glue Path Saturday, March 16, 13
  • 21. Questions worth asking, to help you find your glitter glue path Saturday, March 16, 13
  • 22. How does your business* make make money/deliver value? * the business you are building software for Saturday, March 16, 13
  • 23. How do the users actually use it? Saturday, March 16, 13
  • 24. What are the prominent/relevant traits of your users (e.g. browser types, geographic location, etc.)? Saturday, March 16, 13
  • 25. What things have bitten you before? Saturday, March 16, 13
  • 26. “An example would be handy right about now” - Brian Marick Saturday, March 16, 13
  • 28. 7 Automated Acceptance Tests* Successful platform upgrade Saturday, March 16, 13
  • 31. The Motley Fool To Educate, Amuse, and Enrich Saturday, March 16, 13
  • 32. These things can take time. You have my permission to try until you get it right. Saturday, March 16, 13
  • 34. When To Automate? Questions worth asking Saturday, March 16, 13
  • 35. How long will it take to test manually? Saturday, March 16, 13
  • 36. How long will it take to test manually? This will help you get a baseline before answering the following questions. Saturday, March 16, 13
  • 37. How often will this functionality need to be checked? Saturday, March 16, 13
  • 38. How often will this functionality need to be checked? If often, then it is likely a good candidate for automation. Saturday, March 16, 13
  • 39. Is it valuable (e.g. core functionality, used heavily, a legal or political requirement)? Saturday, March 16, 13
  • 40. Is it valuable (e.g. core functionality, used heavily, a legal or political requirement)? If yes, then it is very likely a candidate for automation. Saturday, March 16, 13
  • 41. How risky is the feature (e.g. fundamental changes, complex architecture, large user facing impact)? Saturday, March 16, 13
  • 42. How risky is the feature (e.g. fundamental changes, complex architecture, large user facing impact)? High? Medium? Or Low? If Medium to High, then maybe. Saturday, March 16, 13
  • 43. What is the level of effort to automate? Saturday, March 16, 13
  • 44. What is the level of effort to automate? T-shirt sizing will help you here: Small: 0-2 hours Medium: 1-2 days Large: 2-4 days X-Large >= 1 week If large or higher, probably not But it really depends on what other work you have committed to Saturday, March 16, 13
  • 45. Does it involve look and feel? Saturday, March 16, 13
  • 46. Does it involve look and feel? If so, then it is likely a ripe candidate for manual testing. Saturday, March 16, 13
  • 47. How To Automate (strategy)? Saturday, March 16, 13
  • 49. Build a feedback loop (Version Control are table stakes) Saturday, March 16, 13
  • 50. Version Control System (VCS) Saturday, March 16, 13
  • 52. How to Automate (tactics)? Saturday, March 16, 13
  • 54. Consider Your Current Tech Stack Saturday, March 16, 13
  • 55. Then Layer In Your Team’s Context (strengths, comfort, confidence, excitement/interest) Saturday, March 16, 13
  • 56. Programming Language? Doesn’t have to be the same as what you develop in. Saturday, March 16, 13
  • 57. Who will own this? Saturday, March 16, 13
  • 58. Open Source Testing Tools Saturday, March 16, 13
  • 59. Agile Alliance Functional Testing Tool group http://bit.ly/AgileTestTools Saturday, March 16, 13
  • 60. But let’s assume UI is involved. In that case, something with WebDriver. Saturday, March 16, 13
  • 61. Full Disclosure: I have some opinions on this Released an open-source web testing framework for Selenium WebDriver http://arrgyle.com/blog/automated-web-testing-is-hard/ Saturday, March 16, 13
  • 62. World’s Quickest Overview on how Selenium works Saturday, March 16, 13
  • 63. Selenium... is a robot sent from the future to help us test web sites uses locators (id, name, link, css, xpath, etc.) to interact with the html elements of the page (a.k.a ‘find by strategy’) ------ The simplest and most sustainable way is to use straight up CSS. Saturday, March 16, 13
  • 64. How to build UI tests so you won’t hate yourself Saturday, March 16, 13
  • 66. Record & Playback is merely a stepping stone Export your tests Treat them like code Page Object Pattern Saturday, March 16, 13
  • 67. He also says: Only use UI tests when you have to... Saturday, March 16, 13
  • 68. But won’t they be slow? Saturday, March 16, 13
  • 72. Test Pack 1 Test Pack 2 VCS CI Simple checks Automated Builds, Acceptance Unit Tests Tests Local Dev Saturday, March 16, 13
  • 73. Garbage In, Garbage Out Saturday, March 16, 13
  • 74. A more testable UI Saturday, March 16, 13
  • 75. More semantic markup (e.g. unique and descriptive locators) Saturday, March 16, 13
  • 76. Inventory and consolidate your design patterns Saturday, March 16, 13
  • 77. But really, it’s about usability Saturday, March 16, 13
  • 78. “The more people think about usability, the more things tend to work out. It's a virtuous path.” - Ken Pier, Senior Director of Product Quality, Socialtext Saturday, March 16, 13
  • 79. “It’s only words and photos on the internet.” - John F. Croston III, Web Content Accessibility Manager for the United States Army (army.mil) Saturday, March 16, 13
  • 81. Recap • You Don’t Have To Test Everything • But do test, intelligently, asking yourself • What matters? • Should I automate this? • Choose a toolchain that’s right for you and your team • Build a feedback loop • Build a more descriptive, usable, and testable web Saturday, March 16, 13
  • 82. I’m writing a book about this stuff! arrgyle.com/book @TourDeDave dave@arrgyle.com Saturday, March 16, 13
  • 84. • A practical guide to usability: http://jfciii.com/presentations/wasp/ accessibility.html • How to address risk in Agile (view it like an investment portfolio): http:// arrgyle.com/blog/agile-accounting/ • Automated Web Testing Is Hard (Introducing ChemistryKit, an open source testing framework to make automated web testing easier): http://arrgyle.com/ blog/automated-web-testing-is-hard/ • CSS Selectors in Selenium: http://sauceio.com/index.php/2010/01/selenium- totw-css-selectors-in-selenium-demystified/ • Locators in Selenium http://marakana.com/bookshelf/selenium_tutorial/ locators.html Saturday, March 16, 13
  • 85. • Page Objects in Selenium: https://code.google.com/p/selenium/wiki/ PageObjects • Page Objects Ruby Gem: https://github.com/cheezy/page-object Saturday, March 16, 13