+ All Categories
Home > Technology > Scaling and Managing Selenium Grid

Scaling and Managing Selenium Grid

Date post: 01-Dec-2014
Category:
Upload: dimakovalenko
View: 458 times
Download: 4 times
Share this document with a friend
Description:
A presentation given at 2014 Selenium Conference in Bangalore talks about common steps to help set up and manage a Selenium Grid environment.
Popular Tags:
46
Scaling and Managing Selenium Grid Dima Kovalenko @dimacus
Transcript
Page 1: Scaling and Managing Selenium Grid

Scaling and Managing Selenium Grid

Dima Kovalenko@dimacus

Page 2: Scaling and Managing Selenium Grid

• Note to self, this slide should be completely blank, NO TEXT of any sort!

Page 3: Scaling and Managing Selenium Grid
Page 4: Scaling and Managing Selenium Grid

Shameless Plug

ISBN: 9781783982707https://www.packtpub.com/web-development/selenium-design-patterns-and-best-practices

Page 5: Scaling and Managing Selenium Grid
Page 6: Scaling and Managing Selenium Grid

Explaining Grid

• Dumb Nodes

Page 7: Scaling and Managing Selenium Grid

Explaining Grid

• Dumb Nodes• Even Dumber Hub

Page 8: Scaling and Managing Selenium Grid

Hub is a Glorified Proxy Server

• HUB is an HTTP Proxy• That tracks node count– Does not know much else about nodes

Page 9: Scaling and Managing Selenium Grid

Getting Priorities Right

• Stability• Speed• Coverage

Page 10: Scaling and Managing Selenium Grid

Stability

• Become a Sys Admin

Page 11: Scaling and Managing Selenium Grid

Stability

• Become a Sys Admin• Move as much to Linux as possible

Page 12: Scaling and Managing Selenium Grid

Stability

• Become a Sys Admin• Move as much to Linux as possible• Only 1 test at the time!

- At least for IE Safari

Page 13: Scaling and Managing Selenium Grid

Stability

• Become a Sys Admin• Move as much to Linux as possible• Only 1 test at the time!

- Shared resources at OS level

Page 14: Scaling and Managing Selenium Grid

Stability

• Become a Sys Admin• Move as much to Linux as possible• Only 1 test at the time!• Configuration as code– Git– Chef– Puppet

Page 15: Scaling and Managing Selenium Grid

Configuration Management

• Node Configs– Grid Hub Configs– Grid Node Configs– Store In Git

Page 16: Scaling and Managing Selenium Grid

Configuration Management

• Node Configs– Grid Hub Configs– Grid Node Configs– Store In Git

• OS Configs– Crons– Versions

• Browsers• Java• Etc..

Page 17: Scaling and Managing Selenium Grid

Speed

• Smaller Nodes– Better to have 10 computers with 1 browser

• It’s ok to use low end machines

Page 18: Scaling and Managing Selenium Grid

Speed

• Smaller Nodes– Better to have 10 computers with 1 browser

• It’s ok to use low end machines– Take performance hit in place of faster run time

Page 19: Scaling and Managing Selenium Grid

Coverage

• Can we add IE6 and 7 to the Grid?

Page 20: Scaling and Managing Selenium Grid

Coverage

Page 21: Scaling and Managing Selenium Grid

Coverage

• More maintenance• IE8 takes 50% of free time

• IE9 or > is much Safer to use

Page 22: Scaling and Managing Selenium Grid

International Buy Jim Evans a BEER day!

Page 23: Scaling and Managing Selenium Grid

International Buy Jim Evans a BEER day!

Page 24: Scaling and Managing Selenium Grid
Page 25: Scaling and Managing Selenium Grid

International Buy Jim Evans a BEER day!

Page 26: Scaling and Managing Selenium Grid
Page 27: Scaling and Managing Selenium Grid

More On Stability

• Don’t Use RC– java -jar selenium.jar -role node

Page 28: Scaling and Managing Selenium Grid

More On Stability

• Don’t Use RC• Use WebDriver–java -jar selenium.jar -role wd

Page 29: Scaling and Managing Selenium Grid

More On Stability

• Replace Internet Explorer with Batch file• Create Crons (Scheduled Tasks)– Periodically Restart Grid node (JAR)– Periodically Restart Computer

Page 30: Scaling and Managing Selenium Grid

More On Stability

• Replace Internet Explorer with Batch file– Cleans up Cookies, Cache, etc– Launches Internet Explorere

Page 31: Scaling and Managing Selenium Grid

More On Stability

• Replace Internet Explorer with Batch file• Create Crons (Scheduled Tasks)• Auto login & Auto Start at login– Always auto login with the Build User

Page 32: Scaling and Managing Selenium Grid

More On Stability

• Replace Internet Explorer with Batch file• Create Crons (Scheduled Tasks)• Auto login & Auto Start at login• Etc.. Etc.. Etc..

Page 33: Scaling and Managing Selenium Grid

Selenium Grid Extras

• 1 year old

Page 34: Scaling and Managing Selenium Grid

Selenium Grid Extras

• https://github.com/groupon/Selenium-Grid-Extras

Page 35: Scaling and Managing Selenium Grid

Goal of the Project

• Document Grid Stability with code

Page 36: Scaling and Managing Selenium Grid

Goal of the Project

• Document Grid Stability with code– (Poorly written Java code that is)

• Make the setup and maintenance of the grid simple

Page 37: Scaling and Managing Selenium Grid

Features to improve stability

• Automatically Set IE Protected Security Zone each reboot

• Move the mouse out of the way• Kill web browser after Test• Kill chromedriver.exe and iedriver.exe after

build• Automatically update Drivers and JARS• Store config for all nodes in single place

Page 38: Scaling and Managing Selenium Grid

Latest Features

• Restart node every X builds, when node is free• Jenkins Plugin• Video recording of test (Work in progress)

Page 39: Scaling and Managing Selenium Grid

Optionally Reboot OS

• Windows reboot not optional!• Improves speed and test stability• Prevents this:

Page 40: Scaling and Managing Selenium Grid
Page 41: Scaling and Managing Selenium Grid

Video Recording

• (Work in Progress)

Page 42: Scaling and Managing Selenium Grid

Demo

Page 43: Scaling and Managing Selenium Grid

Jenkins Plugin

• (Work in Progress)

Page 44: Scaling and Managing Selenium Grid
Page 45: Scaling and Managing Selenium Grid

Find IE Crashes at a Glance

Page 46: Scaling and Managing Selenium Grid

Questions?


Recommended