Selenium                    (You’re doing it wrong)                             Adam Goucher                           ada...
GeneralThursday, 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                                   ...
Thursday, April 7, 2011
My goal is to replace humans and                             push to production fasterThursday, April 7, 2011
My goal is to replace humans and                              push to production faster                          My goal i...
Se-IDEThursday, April 7, 2011
Thursday, April 7, 2011
I save my scripts recorded in Se-IDEThursday, April 7, 2011
I save my scripts recorded in Se-IDE                      I export my scripts recorded in Se-IDEThursday, April 7, 2011
Thursday, April 7, 2011
I have locators in my scriptsThursday, April 7, 2011
I have locators in my scripts                     I have my locators in a user-extensionThursday, April 7, 2011
Thursday, April 7, 2011
I use the default formatterThursday, April 7, 2011
I use the default formatter                          I use a custom formatterThursday, April 7, 2011
Thursday, April 7, 2011
I email updates to formats and                                    extensionsThursday, April 7, 2011
I email updates to formats and                                    extensions                           I use a site-specifi...
Se-RCThursday, April 7, 2011
Thursday, April 7, 2011
My application is written in X so my                                scripts must be as wellThursday, April 7, 2011
My application is written in X so my                                scripts must be as well                   I write scri...
Thursday, April 7, 2011
I inherit from my framework’s                                   TestCase classThursday, April 7, 2011
I inherit from my framework’s                                        TestCase class                          I have a cust...
Thursday, April 7, 2011
I have locators in my scriptsThursday, 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’ locatorsThursday, April 7, 2011
I use ‘brittle’ locators                          I use good structural locatorsThursday, April 7, 2011
Thursday, April 7, 2011
I have static data in my scriptsThursday, April 7, 2011
I have static data in my scripts                          I feed data externally into my scriptsThursday, 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 scr...
Thursday, April 7, 2011
I use a ‘procedural’ scripting styleThursday, April 7, 2011
I use a ‘procedural’ scripting style                                Page Objects FTW!Thursday, April 7, 2011
Thursday, April 7, 2011
I build suites of scriptsThursday, April 7, 2011
I build suites of scripts                            I ‘tag’ my scripts and use my                          framework’s di...
Thursday, April 7, 2011
My automation is different than the                                  production codeThursday, April 7, 2011
My automation is different than the                                  production code                                     N...
Thursday, April 7, 2011
I run my scripts from my local                                     machineThursday, April 7, 2011
I run my scripts from my local                                        machine                          The CI server is my...
Se-GridThursday, April 7, 2011
Thursday, April 7, 2011
I use Se-Grid for cross browser                                    distributionThursday, April 7, 2011
I use Se-Grid for cross browser                                     distribution                          I have browser s...
Thursday, April 7, 2011
I have my own Se-GridThursday, 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                                           saysThursday, April 7, 2011
I will blindly implement what Adam                                           says                   I will use my brain an...
Thanks!Thursday, April 7, 2011
Upcoming SlideShare
Loading in...5
×

You're doing it wrong

4,102

Published on

Selenium anti-patterns and how to start to address them.

You're doing it wrong

  1. 1. Selenium (You’re doing it wrong) Adam Goucher adam@element34.ca @adamgoucherThursday, April 7, 2011
  2. 2. GeneralThursday, April 7, 2011
  3. 3. Thursday, April 7, 2011
  4. 4. I call my automation ‘tests’Thursday, April 7, 2011
  5. 5. I call my automation ‘tests’ I call my automation ‘scripts’ or ‘checks’Thursday, April 7, 2011
  6. 6. Thursday, April 7, 2011
  7. 7. My goal is to replace humans and push to production fasterThursday, April 7, 2011
  8. 8. My goal is to replace humans and push to production faster My goal is to let humans test higher quality builds with greater efficiencyThursday, April 7, 2011
  9. 9. Se-IDEThursday, April 7, 2011
  10. 10. Thursday, April 7, 2011
  11. 11. I save my scripts recorded in Se-IDEThursday, April 7, 2011
  12. 12. I save my scripts recorded in Se-IDE I export my scripts recorded in Se-IDEThursday, April 7, 2011
  13. 13. Thursday, April 7, 2011
  14. 14. I have locators in my scriptsThursday, April 7, 2011
  15. 15. I have locators in my scripts I have my locators in a user-extensionThursday, April 7, 2011
  16. 16. Thursday, April 7, 2011
  17. 17. I use the default formatterThursday, April 7, 2011
  18. 18. I use the default formatter I use a custom formatterThursday, April 7, 2011
  19. 19. Thursday, April 7, 2011
  20. 20. I email updates to formats and extensionsThursday, April 7, 2011
  21. 21. I email updates to formats and extensions I use a site-specific pluginThursday, April 7, 2011
  22. 22. Se-RCThursday, April 7, 2011
  23. 23. Thursday, April 7, 2011
  24. 24. My application is written in X so my scripts must be as wellThursday, April 7, 2011
  25. 25. My application is written in X so my scripts must be as well I write scripts the language that makes the most senseThursday, April 7, 2011
  26. 26. Thursday, April 7, 2011
  27. 27. I inherit from my framework’s TestCase classThursday, April 7, 2011
  28. 28. 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
  29. 29. Thursday, April 7, 2011
  30. 30. I have locators in my scriptsThursday, April 7, 2011
  31. 31. I have locators in my scripts I have my locators in a shared <thing>Thursday, April 7, 2011
  32. 32. Thursday, April 7, 2011
  33. 33. I use ‘brittle’ locatorsThursday, April 7, 2011
  34. 34. I use ‘brittle’ locators I use good structural locatorsThursday, April 7, 2011
  35. 35. Thursday, April 7, 2011
  36. 36. I have static data in my scriptsThursday, April 7, 2011
  37. 37. I have static data in my scripts I feed data externally into my scriptsThursday, April 7, 2011
  38. 38. Thursday, April 7, 2011
  39. 39. Describing my scripts I use the word ‘and’Thursday, April 7, 2011
  40. 40. Describing my scripts I use the word ‘and’ Individual scripts do one thing onlyThursday, April 7, 2011
  41. 41. Thursday, April 7, 2011
  42. 42. I use a ‘procedural’ scripting styleThursday, April 7, 2011
  43. 43. I use a ‘procedural’ scripting style Page Objects FTW!Thursday, April 7, 2011
  44. 44. Thursday, April 7, 2011
  45. 45. I build suites of scriptsThursday, April 7, 2011
  46. 46. I build suites of scripts I ‘tag’ my scripts and use my framework’s discovery methodsThursday, April 7, 2011
  47. 47. Thursday, April 7, 2011
  48. 48. My automation is different than the production codeThursday, April 7, 2011
  49. 49. My automation is different than the production code No. Its not.Thursday, April 7, 2011
  50. 50. Thursday, April 7, 2011
  51. 51. I run my scripts from my local machineThursday, April 7, 2011
  52. 52. I run my scripts from my local machine The CI server is my environment of recordThursday, April 7, 2011
  53. 53. Se-GridThursday, April 7, 2011
  54. 54. Thursday, April 7, 2011
  55. 55. I use Se-Grid for cross browser distributionThursday, April 7, 2011
  56. 56. I use Se-Grid for cross browser distribution I have browser specific jobs in CIThursday, April 7, 2011
  57. 57. Thursday, April 7, 2011
  58. 58. I have my own Se-GridThursday, April 7, 2011
  59. 59. I have my own Se-Grid To the Cloud!Thursday, April 7, 2011
  60. 60. And finally...Thursday, April 7, 2011
  61. 61. Thursday, April 7, 2011
  62. 62. I will blindly implement what Adam saysThursday, April 7, 2011
  63. 63. I will blindly implement what Adam says I will use my brain and use what works for me and ignore what doesn’tThursday, April 7, 2011
  64. 64. Thanks!Thursday, April 7, 2011
  1. A particular slide catching your eye?

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

×