ºÝºÝߣ

ºÝºÝߣShare 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 ef?ciency




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-speci?c 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 speci?c 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 ?nally...



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

You're doing it wrong