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.

Moving From a Selenium Grid to the Cloud - A Real Life Story

1,626 views

Published on

Come hear how Anshul Sharma, Senior QA Engineer at Emmi Solutions, made the move from testing on an in-house Selenium Grid to the Cloud while expanding test coverage and making great strides in moving to a full continuous integration workflow.

Published in: Technology
  • Be the first to comment

  • Be the first to like this

Moving From a Selenium Grid to the Cloud - A Real Life Story

  1. 1. A n s h u l S h a r m a , S r . Q A E n g i n e e r , E m m i S o l u t i o n s August 10, 2016 Moving From a Selenium Grid to the Cloud – A Real Life Story
  2. 2. About Emmi 8/15/2016 PROPRIETARY & CONFIDENTIAL2 Emmi develops patient engagement solutions that help people take active roles in their health and wellbeing.
  3. 3. 8/15/2016 PROPRIETARY & CONFIDENTIAL3 About Me Lead Automation Engineer
  4. 4. Agenda • Introduction: – Selenium Web driver – Selenium Grid • Selenium Grid: – Need – Problem • Benefits of moving to cloud platform from grid • Introduction to cloud platform- Sauce Labs • Best practices and advantages of moving towards cloud platform • Demo • Q & A 8/15/2016 PROPRIETARY & CONFIDENTIAL4
  5. 5. What is Selenium Webdriver? • Selenium is a web API which drives interaction with browser • Repeatable tasks to be automatic rather than doing it manual 8/15/2016 PROPRIETARY & CONFIDENTIAL5
  6. 6. What is Solution Grid? 8/15/2016 PROPRIETARY & CONFIDENTIAL6
  7. 7. Grid Console 8/15/2016 PROPRIETARY & CONFIDENTIAL7
  8. 8. Problem with Running Selenium Grid 8/15/2016 PROPRIETARY & CONFIDENTIAL8 • Cost • Single Point of Failure • High Maintenance • Flakiness
  9. 9. Solution? 8/15/2016 PROPRIETARY & CONFIDENTIAL9
  10. 10. Cost Saving 8/15/2016 PROPRIETARY & CONFIDENTIAL10 Save on resources managing VM’s Move to cloud
  11. 11. Scalability 8/15/2016 PROPRIETARY & CONFIDENTIAL11 Spin up as many VM’s as you want
  12. 12. System Maintenance 8/15/2016 PROPRIETARY & CONFIDENTIAL12 • No worry of system maintenance • Upgrading of antivirus • Installing/upgrading browsers
  13. 13. Integration 8/15/2016 PROPRIETARY & CONFIDENTIAL13
  14. 14. User Control and Security 2016 142016 14
  15. 15. Flexibility 2016 152016 15 VS
  16. 16. ROI 2016 162016 16
  17. 17. How execution happen on Sauce Labs 2016 © Sauce Labs, Inc.17 Selenium or Appium test scripts. Instant access to secure, pristine VMs + mobile devices VM Improve quality with massive coverage. Increase velocity by testing in parallel (avg 10x faster) commands Sauce Connect Proxy Test data Rapidly review, share and debug. results
  18. 18. private static DesiredCapabilities capability = new DesiredCapabilities(); if (browserName != null) capability.setCapability(CapabilityType.BROWSER_NAME, browserName); if (version != null) capability.setCapability(CapabilityType.VERSION, version); if (platform != null) capability.setCapability(CapabilityType.PLATFORM, platform); if (jobName != null) capability.setCapability("name", jobName); driver = new RemoteWebDriver(new URL(UtilConstants.SAUCE_URL), capability); http://<SAUCE_USERNAME>:<API_ACCESS_KEY>@ondemand.saucelabs.com:80/wd/hub") Moving things on cloud using Sauce Labs 2016 18
  19. 19. User Name: API Access Key: 2016 19 Random generated combo of number and alphabets (32 digit) anshulsharma ➢ Used to login to your sauce labs account ➢Run tests against your account ➢Upload resources to Sauce Storage ➢Downloads test results, videos and logs
  20. 20. Running test on local using Sauce Labs <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd"> <suite name="Suite" parallel="false"> <test name="Amazon_Search_Test"> <parameter name="browser" value="Chrome" /> <parameter name="version" value="36" /> <parameter name="platform" value="Windows" /> <parameter name="jobName" value="Amazon Search Test" /> <classes> <class name="testSuite.AmazonTest"/> </classes> </test> <!-- Test --> </suite> <!-- Suite --> 2016 20
  21. 21. Best practices to run tests faster on cloud 2016 21 • Practice modular based testing • Run Atomic test • Data driven testing • Run tests in parallel • Use POM(Page object model)
  22. 22. Summary • Automating more vs managing more • Less coding more results • Speeding up automation development • Better user control and debugging 2016 22
  23. 23. More Info Contact me @: asharma@emmisolutions.com For Source code reference: https://github.com/asharma28/amazon_search_test Sauce Labs documentation: https://wiki.saucelabs.com/ 2016 23
  24. 24. SAUCE LABS RESOURCES Free Trial of Sauce Labs – saucelabs.com/signup/trial Sauce Labs Documentation – wiki.saucelabs.com

×