Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
Upcoming SlideShare
Selenium and Sauce Labs
Selenium and Sauce Labs
Loading in …3
×
1 of 16

Introduction to saucelabs

1

Share

Download to read offline

Introduction to Saucelabs using selnium-python and holmium

Related Books

Free with a 30 day trial from Scribd

See all

Related Audiobooks

Free with a 30 day trial from Scribd

See all

Introduction to saucelabs

  1. 1. Introduction to - Sajnikanth Suriyanarayanan Presented at AlbumPrinter QA Guild on 20th Nov 2014
  2. 2. Contents ● Why Saucelabs? ● Demo script ● Using Sauce to run demo script ● Introduction to holmium ● Running script with holmium on sauce ● Questions
  3. 3. Why Sauce?
  4. 4. ... ● Cross browser ● Cross platform ● Parallel testing ● yada yada… There’s also Browserstack, Browsershots, Browserling etc.
  5. 5. Let’s get our hands dirty
  6. 6. Demo Setup & Intro sudo pip install nose selenium holmium.core git clone https://github.com/sajnikanth/sauce-demo ● Setup ○ Use local Firefox ● Test Steps ○ Go to Vistaprint Corp Page ○ Click on “sign in” button ○ On Login Page, enter username, password and login ○ Check if “Welcome message is displayed” ● Tear Down ○ Quit Browser
  7. 7. Running Demo Script locally python tests/selenium_vistaprint_test.py or nosetests tests/selenium_vistaprint_test.py
  8. 8. Saucelabs Setup ● Register at https://saucelabs.com ○ Have username handy ● Go to https://saucelabs.com/account ● Get Access Key sudo pip install sauceclient
  9. 9. Demo Script on Sauce ● Setup ○ Check if sauce credentials are available during runtime ■ Env - Windows & Chrome ○ If credentials are not available ■ Use local Firefox ● Test Steps ○ Go to Vistaprint Corp Page ○ Click on “sign in” button ○ On Login Page, enter username, password and login ○ Check if “Welcome message is displayed” ● Tear Down ○ Check if sauce credentials are available during runtime ■ Update results on Sauce ○ Quit Browser
  10. 10. Running on Sauce nosetests tests/selenium_vistaprint_test.py -cred=<ENTER SAUCE USERNAME>:<ENTER SAUCE ACCESS KEY>
  11. 11. Demo Script with Holmium Holmium is a plugin for nosetests; can easily create page objects ● Test Steps ○ Go to <URL> ○ Click on “sign in” button ○ Login with <username> and <password> ○ Check if “Welcome message is displayed” ○ Update results on Saucelabs, if possible
  12. 12. ...
  13. 13. Demo Script with Holmium on Sauce nosetests tests/holmium_vistaprint_test.py --with-holmium --holmium-browser=firefox --holmium-environment=http://vistaprint.com --holmium-remote=http://<ENTER SAUCE USERNAME>:<ENTER SAUCE ACCESS KEY>@ondemand.saucelabs.com:80/wd/hub --holmium-capabilities='{"platform":"OS X 10.10", "name":"vistaprint_login"}'
  14. 14. ...
  15. 15. Recap ● Demo script run locally on Firefox (hard-coded) ● Demo script run on Sauce on Windows / Chrome (hard-coded) ● Demo script with holmium on Sauce on OSX / Firefox (command line parameter)
  16. 16. Questions? Resources ● Presentation Link - http://j.mp/introduction-to-sauce ● Demo Script ● Holmium ● Introduction to SauceLabs by Ryan Lane ● BrowserStack vs Sauce Labs Contact ● mail@sajnikanth.com

×