250 likes | 903 Views
Selenium Grid. By David Williams Digital Instinct - Selenium Monkey Test Analyst. What is Selenium Grid. Testers. CHROME. IE. Firefox. The Hub. To Get Up And Running. Need to install: - Browser Drivers - Selenium Server - Java Currently we use:
E N D
Selenium Grid By David Williams Digital Instinct - Selenium Monkey Test Analyst
What is Selenium Grid Testers CHROME IE Firefox The Hub
To Get Up And Running • Need to install: • - Browser Drivers • - Selenium Server • - Java • Currently we use: • Link: http://selenium-release.storage.googleapis.com/index.html?path=2.42/ • - Download selenium-server-standalone • - Firefox – Comes as part of selenium server. • - IE Driver • Link: http://chromedriver.storage.googleapis.com/index.html • -Chrome • NOTE: Both IE and Chrome need to be a part of your PATH (Environmental Variables)
.BatMan Begins • Use separate batch files to run both the hub and the nodes. • Able to link these batch files to CI server. • Hub: • Nodes:
Call It from within Your Tests (Cont…) This is an example of using parameterised tests. The 1,2,3 is the int used is the browserID. This browserID is then passed into the constructor, and then into the getBrowserDriver method.
Pros To Selenium Grid • Gateway between Webdriver and Cross browser functional testing. • Opens the door for parallel testing. • Advanced packages not be feasible within budget at current and Selenium Grid provides a “free” alternative. • Impossible to justify the costs of more advanced packages (e.g. SauceLabs) without prototyping automated testing. • More control over the testing system • More security, company not wanting to hand their product over an outside business.
Flaws of Selenium Grid • Maintenance, whenever there are upgrades to browsers it usually coincides with updates to selenium and the appropriate drivers. • - Upgrading takes time and can be an inconvenience • Bare bones, the nicer features aren’t there to begin with and may need some developer help to get them (e.g. Screenshot on fail). • Whereas SauceLabs offers screenshots and video. • May be better hardware options to test on, using Selenium Grid is a lot more restrictive. Note1: Can’t comment on other packages, as haven’t used or investigated them. Note2: Selenium 2.42.2 adds much better screenshot handling, so this is a bad example.
Any Questions? • Feel free to approach me afterwards, or email me at david.williams@digitalinstinct.com.au
References • Kraken Picture: • http://www.fubiz.net/2012/03/09/the-kraken-existence/the-kraken-existence2/ • Batman Picture: • http://i.imgur.com/3SAl7wE.jpg • Not a reference per say, but a great resource for selenium and selenium grid. • Elemental Selenium • http://elementalselenium.com/