selenium for pythonistas
Post on 06-May-2015
282 Views
Preview:
DESCRIPTION
TRANSCRIPT
Selenium for PythonistasAdd real browsers to your Utility Belt!
sso@saucelabs - @santiycr - Sauce Labs
Who's this dude?
Santiago Suarez OrdoñezLead Backend Developer - Sauce LabsCommitter - Selenium Project6+ years on Selenium and Python
How about Sauce Labs?
Browsers in the cloudTest mobile and web apps in parallel+150 OS/Browser platformsVideos, screenshots, logs, badges, FLOSS
Agenda
Selenium is just a libraryTesting best practicesSelenium best practicesAdvanced featuresDebuggingQ&A
What people use it for?Common use cases for real browsers
MOCK ALL THE THINGS!!If you didn't write it, don't rely on it
Avoid inter-test dependencies
Independent tests are good!
Tests Start
Test Create Account(User A)
Test Login(User A)
Test Change Password(User A)
Test Close Account(User A)
Run tests automaticallyCI, pre-commit, CD, monitoring
Make writing tests easyIf it takes > 30 min, I'm not gonna do it
Now regarding SeleniumThere's lots of Selenium best practices
Do Not Use Selenium!No, seriously!
Generate application stateThe UI is the slowest path to any state in
your 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 waits in your testsImplicit and Explicit waits will get you 90% there
Debugging failuresConsumes 99% of your time while working
with Selenium
Appium
sso@saucelabs - @santiycr - Sauce Labs
Thanks!
top related