Download - Move Your Selenium Testing to the Cloud
BT12Session6/9/163:00PM
MoveYourSeleniumTestingtotheCloud
Presentedby:
AnshulSharma
EmmiSolutions
Broughttoyouby:
350CorporateWay,Suite400,OrangePark,FL32073888---268---8770··[email protected]://www.techwell.com/
AnshulSharmaEmmiSolutionsAnshulSharmaistheleadQAautomationengineeratEmmi,whosegoalistoeducatepatientsabouttheirhealththroughinteractivemultimediaprograms.Duringhermorethannine-yearsoftwaretestinganddevelopmentcareer,Anshulhaswornmultiplehatsintechnologyasadeveloper,businessanalyst,tester,andteamlead.Shehasworkedwithtopplayersinfinanceandhealthcare.Anshulispassionateabouttechnology,usingcodetotestcodeandblurringthelinesbetweendevandQA.
5/31/16
1
2016 1
LeadAutoma2onEngineerLinkedin:h;ps://www.linkedin.com/in/anshulsharmaemmiEmail:[email protected]
About Me…
2016 2
5/31/16
2
• Introduc2ontoSeleniumWebdriver• Introduc2ontoSeleniumGrid• NeedforSeleniumGrid• ProblemwithrunningSeleniumGrid• BenefitsofmovingtocloudplaNormfromgrid• Introduc2ontocloudplaNorm-SauceLabs• AdvantagesofmovingtowardscloudplaNorm• Demo• Q&A
Agenda
2016 3
What is Selenium Webdriver
• SeleniumisawebAPIwhichdrivesinterac2onwithbrowser
• Repeatabletaskstobeautoma2cratherthandoingitmanual
2016 4
5/31/16
3
What is Selenium Grid
2016 5
2016 6
Grid Console
5/31/16
4
Need for Selenium Grid
• SeleniumGridgivestheflexibilitytodistributeyourtestcasesforexecu2on.
• Reducesbatchprocessing2me.
• Mul2browserandplaNormtes2ng.
• Devicetes2ng.
2016 7
Problems with running Selenium Grid
• HighMaintenance
• Cost
• Flakiness
2016 8
5/31/16
5
Benefits of moving towards cloud
2016 9
Cloud plaBorm- Using Sauce Labs
2016 10
5/31/16
6
Running things behind firewall- Sauce Connect
2016 11
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);
h"p://<SAUCE_USERNAME>:<API_ACCESS_KEY>@ondemand.saucelabs.com:80/wd/hub")
2016 12
5/31/16
7
ImplemenHng Cloud Using Sauce Labs
2016 13
Random generated combo of number and alphabets (32 digit)anshulsharma
Ø Usedtologintoyoursaucelabsaccount
Ø Runtestsagainstyouraccount
Ø UploadresourcestoSauceStorage
Ø Downloadstestresults,videosandlogs
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 14
5/31/16
8
Advantages moving towards cloud
• Automa2ngmorevsmanagingmore
• Lesscodingmoreresults
• Speedingupdevelopment
• Be;erusercontrolanddebugging
2016 15
Contactme@:[email protected]:h;ps://wiki.saucelabs.com/
2016 16