10
BT12 Session 6/9/16 3:00 PM Move Your Selenium Testing to the Cloud Presented by: Anshul Sharma Emmi Solutions Brought to you by: 350 Corporate Way, Suite 400, Orange Park, FL 32073 888---268---8770 ·· 904---278---0524 - [email protected] - http://www.techwell.com/

Move Your Selenium Testing to the Cloud

Embed Size (px)

Citation preview

Page 1: 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/

Page 2: Move Your Selenium Testing to the Cloud

AnshulSharmaEmmiSolutionsAnshulSharmaistheleadQAautomationengineeratEmmi,whosegoalistoeducatepatientsabouttheirhealththroughinteractivemultimediaprograms.Duringhermorethannine-yearsoftwaretestinganddevelopmentcareer,Anshulhaswornmultiplehatsintechnologyasadeveloper,businessanalyst,tester,andteamlead.Shehasworkedwithtopplayersinfinanceandhealthcare.Anshulispassionateabouttechnology,usingcodetotestcodeandblurringthelinesbetweendevandQA.

Page 3: Move Your Selenium Testing to the Cloud

5/31/16

1

2016 1

LeadAutoma2onEngineerLinkedin:h;ps://www.linkedin.com/in/anshulsharmaemmiEmail:[email protected]

About Me…

2016 2

Page 4: Move Your Selenium Testing to the Cloud

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

Page 5: Move Your Selenium Testing to the Cloud

5/31/16

3

What is Selenium Grid

2016 5

2016 6

Grid Console

Page 6: Move Your Selenium Testing to the Cloud

5/31/16

4

Need for Selenium Grid

•  SeleniumGridgivestheflexibilitytodistributeyourtestcasesforexecu2on.

• Reducesbatchprocessing2me.

• Mul2browserandplaNormtes2ng.

• Devicetes2ng.

2016 7

Problems with running Selenium Grid

• HighMaintenance

• Cost

•  Flakiness

2016 8

Page 7: Move Your Selenium Testing to the Cloud

5/31/16

5

Benefits of moving towards cloud

2016 9

Cloud plaBorm- Using Sauce Labs

2016 10

Page 8: Move Your Selenium Testing to the Cloud

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

Page 9: Move Your Selenium Testing to the Cloud

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

Page 10: Move Your Selenium Testing to the Cloud

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