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.
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Moving From a Selenium Grid to the Cloud - A Real Life Story
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. About Emmi
8/15/2016 PROPRIETARY & CONFIDENTIAL2
Emmi develops patient engagement solutions that help people take active roles in their
health and wellbeing.
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. 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
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. 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. 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. 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. Summary
• Automating more vs managing more
• Less coding more results
• Speeding up automation development
• Better user control and debugging
2016 22
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