SlideShare a Scribd company logo
Selenium
                    (You’re doing it wrong)
                             Adam Goucher
                           adam@element34.ca
                             @adamgoucher




Thursday, April 7, 2011
General



Thursday, April 7, 2011
Thursday, April 7, 2011
I call my automation ‘tests’




Thursday, April 7, 2011
I call my automation ‘tests’

                          I call my automation ‘scripts’ or
                                       ‘checks’




Thursday, April 7, 2011
Thursday, April 7, 2011
My goal is to replace humans and
                             push to production faster




Thursday, April 7, 2011
My goal is to replace humans and
                              push to production faster

                          My goal is to let humans test higher
                          quality builds with greater efficiency




Thursday, April 7, 2011
Se-IDE



Thursday, April 7, 2011
Thursday, April 7, 2011
I save my scripts recorded in Se-IDE




Thursday, April 7, 2011
I save my scripts recorded in Se-IDE


                      I export my scripts recorded in Se-IDE




Thursday, April 7, 2011
Thursday, April 7, 2011
I have locators in my scripts




Thursday, April 7, 2011
I have locators in my scripts


                     I have my locators in a user-extension




Thursday, April 7, 2011
Thursday, April 7, 2011
I use the default formatter




Thursday, April 7, 2011
I use the default formatter


                          I use a custom formatter




Thursday, April 7, 2011
Thursday, April 7, 2011
I email updates to formats and
                                    extensions




Thursday, April 7, 2011
I email updates to formats and
                                    extensions

                           I use a site-specific plugin




Thursday, April 7, 2011
Se-RC



Thursday, April 7, 2011
Thursday, April 7, 2011
My application is written in X so my
                                scripts must be as well




Thursday, April 7, 2011
My application is written in X so my
                                scripts must be as well

                   I write scripts the language that makes
                                the most sense




Thursday, April 7, 2011
Thursday, April 7, 2011
I inherit from my framework’s
                                   TestCase class




Thursday, April 7, 2011
I inherit from my framework’s
                                        TestCase class
                          I have a custom class that my scripts
                           inherit from (-- it inherits from my
                               framework’s TestCase class)



Thursday, April 7, 2011
Thursday, April 7, 2011
I have locators in my scripts




Thursday, April 7, 2011
I have locators in my scripts


                    I have my locators in a shared <thing>




Thursday, April 7, 2011
Thursday, April 7, 2011
I use ‘brittle’ locators




Thursday, April 7, 2011
I use ‘brittle’ locators


                          I use good structural locators




Thursday, April 7, 2011
Thursday, April 7, 2011
I have static data in my scripts




Thursday, April 7, 2011
I have static data in my scripts


                          I feed data externally into my scripts




Thursday, April 7, 2011
Thursday, April 7, 2011
Describing my scripts I use the word
                                         ‘and’




Thursday, April 7, 2011
Describing my scripts I use the word
                                         ‘and’

                          Individual scripts do one thing only




Thursday, April 7, 2011
Thursday, April 7, 2011
I use a ‘procedural’ scripting style




Thursday, April 7, 2011
I use a ‘procedural’ scripting style


                                Page Objects FTW!




Thursday, April 7, 2011
Thursday, April 7, 2011
I build suites of scripts




Thursday, April 7, 2011
I build suites of scripts

                            I ‘tag’ my scripts and use my
                          framework’s discovery methods




Thursday, April 7, 2011
Thursday, April 7, 2011
My automation is different than the
                                  production code




Thursday, April 7, 2011
My automation is different than the
                                  production code

                                     No. Its not.




Thursday, April 7, 2011
Thursday, April 7, 2011
I run my scripts from my local
                                     machine




Thursday, April 7, 2011
I run my scripts from my local
                                        machine

                          The CI server is my environment of
                                        record




Thursday, April 7, 2011
Se-Grid



Thursday, April 7, 2011
Thursday, April 7, 2011
I use Se-Grid for cross browser
                                    distribution




Thursday, April 7, 2011
I use Se-Grid for cross browser
                                     distribution

                          I have browser specific jobs in CI




Thursday, April 7, 2011
Thursday, April 7, 2011
I have my own Se-Grid




Thursday, April 7, 2011
I have my own Se-Grid


                             To the Cloud!




Thursday, April 7, 2011
And finally...



Thursday, April 7, 2011
Thursday, April 7, 2011
I will blindly implement what Adam
                                           says




Thursday, April 7, 2011
I will blindly implement what Adam
                                           says

                   I will use my brain and use what works
                       for me and ignore what doesn’t




Thursday, April 7, 2011
Thanks!



Thursday, April 7, 2011

More Related Content

PDF
Business of APIs Conference 2011 - YourTrove
PDF
Namesmatter
PDF
Events+Me
PDF
The Ethics of Abandoning Software
PDF
Inspiratiemiddag_Vincent_Everts_Finalist generatie_einstein_komt_eraan_07042011
PDF
Einstein finalist.nl
PDF
What's Cooking in Xtext 2.0
PDF
The Many Hats of Building and Launching a Web Startup
Business of APIs Conference 2011 - YourTrove
Namesmatter
Events+Me
The Ethics of Abandoning Software
Inspiratiemiddag_Vincent_Everts_Finalist generatie_einstein_komt_eraan_07042011
Einstein finalist.nl
What's Cooking in Xtext 2.0
The Many Hats of Building and Launching a Web Startup

Similar to You're doing it wrong (20)

PDF
Now discover your strengths
PDF
Koss, How to make desktop caliber browser apps
PDF
Innovation and Disruption in the Real Estate Industry by David Eaves
PDF
HTML5 and jQuery for Flex Developers
PDF
Discussing Java's Future
PDF
The Fast, The Slow and the Lazy
PDF
Can Metadata Keep Libraries Relevant?
PDF
让开发也懂前端
PDF
Using+javascript+to+build+native+i os+applications
PDF
Beyond Page Objects
PDF
Tim Malbon How to Actually Make Something | MDW August 2011
PDF
JavaScript Landscape
PDF
"Data in the Digital Age" - Hadoop Big Data Meetup
PDF
Accessibility Lightning Talk
PDF
Persuasive Speaking
PDF
Agile the pivotal way
PDF
High quality iOS development
PDF
Web Operations Career
PDF
Intro to Micro-frameworks
PDF
とりあえずTwitterで日本語を集めてみよう
Now discover your strengths
Koss, How to make desktop caliber browser apps
Innovation and Disruption in the Real Estate Industry by David Eaves
HTML5 and jQuery for Flex Developers
Discussing Java's Future
The Fast, The Slow and the Lazy
Can Metadata Keep Libraries Relevant?
让开发也懂前端
Using+javascript+to+build+native+i os+applications
Beyond Page Objects
Tim Malbon How to Actually Make Something | MDW August 2011
JavaScript Landscape
"Data in the Digital Age" - Hadoop Big Data Meetup
Accessibility Lightning Talk
Persuasive Speaking
Agile the pivotal way
High quality iOS development
Web Operations Career
Intro to Micro-frameworks
とりあえずTwitterで日本語を集めてみよう
Ad

More from Adam Goucher (20)

PDF
Lightsabers, Time Machines and other Automation Heuristics
PDF
SeleniumConf London 2019 - "Part 3: Practice what you Preach"
PDF
Is your Automation Infrastructure ‘Well Architected’?
PDF
Your Job Is To Collect Stories
PDF
[Automation] Trick-or-Treat Style
KEY
Proxy and Executor
PDF
Maintainable Automation FTW
PDF
Selenium Page Objects101
KEY
Selenium IDE - The future if plugin-y
PDF
Everything I learned about Agile I learned from Pirates
PDF
Agile Test Case Management
PDF
Mitigation
PDF
The Many Hats of a Tester
PDF
Testing inspiration
PDF
Archetypes
PDF
Agile Hats Art Show
PDF
Quality through the lens of Astrophysics
PDF
Legend of Zealot Anarchist Robot
PDF
Scripting Recipes KWSQA2009
PDF
Scripting Recipes for Testers
Lightsabers, Time Machines and other Automation Heuristics
SeleniumConf London 2019 - "Part 3: Practice what you Preach"
Is your Automation Infrastructure ‘Well Architected’?
Your Job Is To Collect Stories
[Automation] Trick-or-Treat Style
Proxy and Executor
Maintainable Automation FTW
Selenium Page Objects101
Selenium IDE - The future if plugin-y
Everything I learned about Agile I learned from Pirates
Agile Test Case Management
Mitigation
The Many Hats of a Tester
Testing inspiration
Archetypes
Agile Hats Art Show
Quality through the lens of Astrophysics
Legend of Zealot Anarchist Robot
Scripting Recipes KWSQA2009
Scripting Recipes for Testers
Ad

You're doing it wrong