SlideShare a Scribd company logo
1 of 64
Download to read offline
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

Similar to You're doing it wrong

Koss, How to make desktop caliber browser apps
Koss, How to make desktop caliber browser appsKoss, How to make desktop caliber browser apps
Koss, How to make desktop caliber browser appsEvil Martians
 
Innovation and Disruption in the Real Estate Industry by David Eaves
Innovation and Disruption in the Real Estate Industry by David EavesInnovation and Disruption in the Real Estate Industry by David Eaves
Innovation and Disruption in the Real Estate Industry by David EavesDavid Eaves
 
HTML5 and jQuery for Flex Developers
HTML5 and jQuery for Flex DevelopersHTML5 and jQuery for Flex Developers
HTML5 and jQuery for Flex DevelopersRyan Stewart
 
Discussing Java's Future
Discussing Java's FutureDiscussing Java's Future
Discussing Java's FutureRay Gauss
 
The Fast, The Slow and the Lazy
The Fast, The Slow and the LazyThe Fast, The Slow and the Lazy
The Fast, The Slow and the LazyMaurício Linhares
 
Can Metadata Keep Libraries Relevant?
Can Metadata Keep Libraries Relevant?Can Metadata Keep Libraries Relevant?
Can Metadata Keep Libraries Relevant?Richard Wallis
 
让开发也懂前端
让开发也懂前端让开发也懂前端
让开发也懂前端lifesinger
 
Using+javascript+to+build+native+i os+applications
Using+javascript+to+build+native+i os+applicationsUsing+javascript+to+build+native+i os+applications
Using+javascript+to+build+native+i os+applicationsMuhammad Ikram Ul Haq
 
Tim Malbon How to Actually Make Something | MDW August 2011
Tim Malbon How to Actually Make Something | MDW August 2011Tim Malbon How to Actually Make Something | MDW August 2011
Tim Malbon How to Actually Make Something | MDW August 2011Boulder Digital Works at CU
 
"Data in the Digital Age" - Hadoop Big Data Meetup
"Data in the Digital Age" - Hadoop Big Data Meetup"Data in the Digital Age" - Hadoop Big Data Meetup
"Data in the Digital Age" - Hadoop Big Data MeetupKaitlin Thaney
 
Accessibility Lightning Talk
Accessibility Lightning TalkAccessibility Lightning Talk
Accessibility Lightning TalkRussell Heimlich
 
Agile the pivotal way
Agile the pivotal wayAgile the pivotal way
Agile the pivotal wayMike Gehard
 
High quality iOS development
High quality iOS developmentHigh quality iOS development
High quality iOS developmentRobin Lu
 
Intro to Micro-frameworks
Intro to Micro-frameworksIntro to Micro-frameworks
Intro to Micro-frameworksjsmith92
 
とりあえずTwitterで日本語を集めてみよう
とりあえずTwitterで日本語を集めてみようとりあえずTwitterで日本語を集めてみよう
とりあえずTwitterで日本語を集めてみようs_wool
 
Atlassian RoadTrip 2011 Slide Deck
Atlassian RoadTrip 2011 Slide DeckAtlassian RoadTrip 2011 Slide Deck
Atlassian RoadTrip 2011 Slide DeckAtlassian
 

Similar to You're doing it wrong (20)

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

More from Adam Goucher

Lightsabers, Time Machines and other Automation Heuristics
Lightsabers, Time Machines and other Automation HeuristicsLightsabers, Time Machines and other Automation Heuristics
Lightsabers, Time Machines and other Automation HeuristicsAdam Goucher
 
SeleniumConf London 2019 - "Part 3: Practice what you Preach"
SeleniumConf London 2019 - "Part 3: Practice what you Preach"SeleniumConf London 2019 - "Part 3: Practice what you Preach"
SeleniumConf London 2019 - "Part 3: Practice what you Preach"Adam Goucher
 
Is your Automation Infrastructure ‘Well Architected’?
Is your Automation Infrastructure ‘Well Architected’?Is your Automation Infrastructure ‘Well Architected’?
Is your Automation Infrastructure ‘Well Architected’?Adam Goucher
 
Your Job Is To Collect Stories
Your Job Is To Collect StoriesYour Job Is To Collect Stories
Your Job Is To Collect StoriesAdam Goucher
 
[Automation] Trick-or-Treat Style
[Automation] Trick-or-Treat Style[Automation] Trick-or-Treat Style
[Automation] Trick-or-Treat StyleAdam Goucher
 
Proxy and Executor
Proxy and ExecutorProxy and Executor
Proxy and ExecutorAdam Goucher
 
Maintainable Automation FTW
Maintainable Automation FTWMaintainable Automation FTW
Maintainable Automation FTWAdam Goucher
 
Selenium Page Objects101
Selenium Page Objects101Selenium Page Objects101
Selenium Page Objects101Adam Goucher
 
Selenium IDE - The future if plugin-y
Selenium IDE - The future if plugin-ySelenium IDE - The future if plugin-y
Selenium IDE - The future if plugin-yAdam Goucher
 
Everything I learned about Agile I learned from Pirates
Everything I learned about Agile I learned from PiratesEverything I learned about Agile I learned from Pirates
Everything I learned about Agile I learned from PiratesAdam Goucher
 
Agile Test Case Management
Agile Test Case ManagementAgile Test Case Management
Agile Test Case ManagementAdam Goucher
 
The Many Hats of a Tester
The Many Hats of a TesterThe Many Hats of a Tester
The Many Hats of a TesterAdam Goucher
 
Testing inspiration
Testing inspirationTesting inspiration
Testing inspirationAdam Goucher
 
Agile Hats Art Show
Agile Hats Art ShowAgile Hats Art Show
Agile Hats Art ShowAdam Goucher
 
Quality through the lens of Astrophysics
Quality through the lens of AstrophysicsQuality through the lens of Astrophysics
Quality through the lens of AstrophysicsAdam Goucher
 
Legend of Zealot Anarchist Robot
Legend of Zealot Anarchist RobotLegend of Zealot Anarchist Robot
Legend of Zealot Anarchist RobotAdam Goucher
 
Scripting Recipes KWSQA2009
Scripting Recipes KWSQA2009Scripting Recipes KWSQA2009
Scripting Recipes KWSQA2009Adam Goucher
 
Scripting Recipes for Testers
Scripting Recipes for TestersScripting Recipes for Testers
Scripting Recipes for TestersAdam Goucher
 

More from Adam Goucher (20)

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

You're doing it wrong