As a software professional it is very important to make sure the software/utility being developed is performing as per specification and being tested thoroughly on cross browser and multi platform, in order to make sure the software is compatible across multiple platforms it takes substantial amount of infrastrucre, manpower and maintenance to it, what if we all of this can be acheived with faster results, better coverage and cost effectively. Come lets talk about how we can acheive all of this by leveraging the use of cloud platform for our selenium testing
https://bscwest.techwell.com/program/concurrent-sessions/move-your-selenium-testing-cloud
2. Lead Automation Engineer
Linked in: https://www.linkedin.com/in/anshulsharmaemmi
Email: asharma@emmisolutions.com
About Me…
2016 2
3. • Introduction to Selenium Webdriver
• Introduction to Selenium Grid
• Need for Selenium Grid
• Problem with running Selenium Grid
• 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
Agenda
2016 3
4. What is Selenium Webdriver
• Selenium is a web
API which drives
interaction with
browser
• Repeatable tasks to
be automatic rather
than doing it manual
2016 4
20. Moving things on cloud using Sauce Labs
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")
2016 20
21. 2016 21
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
22. 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 22
23. 2016 23
Best practices to run tests faster on cloud
• Practice modular based testing
• Data driven testing
• Run tests in parallel
• Use POM(Page object model)
24. Summary
• Automating more vs managing more
• Less coding more results
• Speeding up automation development
• Better user control and debugging
2016 24
25. Contact me @: asharma@emmisolutions.com
For Source code reference: https://github.com/asharma28/amazon_search_test
Sauce Labs documentation: https://wiki.saucelabs.com/
2016 25