Successfully reported this slideshow.
Selenium for PythonistasAdd real browsers to your Utility Belt!sso@saucelabs - @santiycr - Sauce Labs
Whos this dude?Santiago Suarez OrdoñezLead Backend Developer - Sauce LabsCommitter - Selenium Project6+ years on Selenium ...
How about Sauce Labs?Browsers in the cloudTest mobile and web apps in parallel+150 OS/Browser platformsVideos, screenshots...
AgendaSelenium is just a libraryTesting best practicesSelenium best practicesAdvanced featuresDebuggingQ&A
SeleniumHistory and Goals
How do I use it?Demo!
What people use it for?Common use cases for real browsers
Lets focus on testingThats what youre here for
DRYThats what youre here for
MOCK ALL THE THINGS!!If you didnt write it, dont rely on it
Write small testsLess is more
:,(
Avoid inter-testdependenciesIndependent tests are good!
Tests StartTest CreateAccount(User A)Test Login(User A)Test ChangePassword(User A)Test CloseAccount(User A)
Run tests automaticallyCI, pre-commit, CD, monitoring
Keep your build green100% green is the only green
Make writing tests easyIf it takes > 30 min, Im not gonna do it
Now regarding SeleniumTheres lots of Selenium best practices
Do Not Use Selenium!No, seriously!
Generate application stateThe UI is the slowest path to any state inyour app
Use Guinea PigsTest complex widgets out of app workflows
ParallelizeBrowsers are slow and bulky.Throw hardware at the problem.
Use Page Object ModelsThey are just code abstractions, you know?
Use Javascriptexecute_script("window.antigravity")
Use waits in your testsImplicit and Explicit waits will get you 90% there
Debugging failuresConsumes 99% of your time while workingwith Selenium
Appium
Questions?Hot Sauce anyone?
sso@saucelabs - @santiycr - Sauce LabsThanks!
Selenium for pythonistas
Selenium for pythonistas
Selenium for pythonistas
Upcoming SlideShare
Loading in …5
×

Selenium for pythonistas

657 views

Published on

Talk given for the San Francisco Python Meetup at Yelp on May 8th, 2013. Focused mainly in Selenium and Testing tips.

Published in: Technology
  • Be the first to comment

  • Be the first to like this

Selenium for pythonistas

  1. 1. Selenium for PythonistasAdd real browsers to your Utility Belt!sso@saucelabs - @santiycr - Sauce Labs
  2. 2. Whos this dude?Santiago Suarez OrdoñezLead Backend Developer - Sauce LabsCommitter - Selenium Project6+ years on Selenium and Python
  3. 3. How about Sauce Labs?Browsers in the cloudTest mobile and web apps in parallel+150 OS/Browser platformsVideos, screenshots, logs, badges, FLOSS
  4. 4. AgendaSelenium is just a libraryTesting best practicesSelenium best practicesAdvanced featuresDebuggingQ&A
  5. 5. SeleniumHistory and Goals
  6. 6. How do I use it?Demo!
  7. 7. What people use it for?Common use cases for real browsers
  8. 8. Lets focus on testingThats what youre here for
  9. 9. DRYThats what youre here for
  10. 10. MOCK ALL THE THINGS!!If you didnt write it, dont rely on it
  11. 11. Write small testsLess is more
  12. 12. :,(
  13. 13. Avoid inter-testdependenciesIndependent tests are good!
  14. 14. Tests StartTest CreateAccount(User A)Test Login(User A)Test ChangePassword(User A)Test CloseAccount(User A)
  15. 15. Run tests automaticallyCI, pre-commit, CD, monitoring
  16. 16. Keep your build green100% green is the only green
  17. 17. Make writing tests easyIf it takes > 30 min, Im not gonna do it
  18. 18. Now regarding SeleniumTheres lots of Selenium best practices
  19. 19. Do Not Use Selenium!No, seriously!
  20. 20. Generate application stateThe UI is the slowest path to any state inyour app
  21. 21. Use Guinea PigsTest complex widgets out of app workflows
  22. 22. ParallelizeBrowsers are slow and bulky.Throw hardware at the problem.
  23. 23. Use Page Object ModelsThey are just code abstractions, you know?
  24. 24. Use Javascriptexecute_script("window.antigravity")
  25. 25. Use waits in your testsImplicit and Explicit waits will get you 90% there
  26. 26. Debugging failuresConsumes 99% of your time while workingwith Selenium
  27. 27. Appium
  28. 28. Questions?Hot Sauce anyone?
  29. 29. sso@saucelabs - @santiycr - Sauce LabsThanks!

×