managing large selenium grid
DESCRIPTION
Presentation for 2014 Selenium Camp In Kiev Link to audio of the presentation http://www.youtube.com/watch?v=OrtR_k1biOg&feature=youtu.beTRANSCRIPT
![Page 1: Managing Large Selenium Grid](https://reader033.vdocuments.mx/reader033/viewer/2022061218/54b69ccf4a7959ac588b4585/html5/thumbnails/1.jpg)
Managing Large Selenium Grid
Dima Kovalenko (@dimacus)Jack Calzaretta
![Page 2: Managing Large Selenium Grid](https://reader033.vdocuments.mx/reader033/viewer/2022061218/54b69ccf4a7959ac588b4585/html5/thumbnails/2.jpg)
![Page 3: Managing Large Selenium Grid](https://reader033.vdocuments.mx/reader033/viewer/2022061218/54b69ccf4a7959ac588b4585/html5/thumbnails/3.jpg)
http://seleniumcamp.com
![Page 4: Managing Large Selenium Grid](https://reader033.vdocuments.mx/reader033/viewer/2022061218/54b69ccf4a7959ac588b4585/html5/thumbnails/4.jpg)
![Page 5: Managing Large Selenium Grid](https://reader033.vdocuments.mx/reader033/viewer/2022061218/54b69ccf4a7959ac588b4585/html5/thumbnails/5.jpg)
![Page 6: Managing Large Selenium Grid](https://reader033.vdocuments.mx/reader033/viewer/2022061218/54b69ccf4a7959ac588b4585/html5/thumbnails/6.jpg)
![Page 7: Managing Large Selenium Grid](https://reader033.vdocuments.mx/reader033/viewer/2022061218/54b69ccf4a7959ac588b4585/html5/thumbnails/7.jpg)
![Page 8: Managing Large Selenium Grid](https://reader033.vdocuments.mx/reader033/viewer/2022061218/54b69ccf4a7959ac588b4585/html5/thumbnails/8.jpg)
![Page 9: Managing Large Selenium Grid](https://reader033.vdocuments.mx/reader033/viewer/2022061218/54b69ccf4a7959ac588b4585/html5/thumbnails/9.jpg)
VMs
![Page 10: Managing Large Selenium Grid](https://reader033.vdocuments.mx/reader033/viewer/2022061218/54b69ccf4a7959ac588b4585/html5/thumbnails/10.jpg)
![Page 11: Managing Large Selenium Grid](https://reader033.vdocuments.mx/reader033/viewer/2022061218/54b69ccf4a7959ac588b4585/html5/thumbnails/11.jpg)
![Page 12: Managing Large Selenium Grid](https://reader033.vdocuments.mx/reader033/viewer/2022061218/54b69ccf4a7959ac588b4585/html5/thumbnails/12.jpg)
www.xenproject.org
![Page 13: Managing Large Selenium Grid](https://reader033.vdocuments.mx/reader033/viewer/2022061218/54b69ccf4a7959ac588b4585/html5/thumbnails/13.jpg)
Open Source
• GNU License• Free
![Page 14: Managing Large Selenium Grid](https://reader033.vdocuments.mx/reader033/viewer/2022061218/54b69ccf4a7959ac588b4585/html5/thumbnails/14.jpg)
Fast
• Lightweight• Windows restarts in 5 seconds• 8 Windows 7 VMs on 1 host
![Page 15: Managing Large Selenium Grid](https://reader033.vdocuments.mx/reader033/viewer/2022061218/54b69ccf4a7959ac588b4585/html5/thumbnails/15.jpg)
![Page 16: Managing Large Selenium Grid](https://reader033.vdocuments.mx/reader033/viewer/2022061218/54b69ccf4a7959ac588b4585/html5/thumbnails/16.jpg)
![Page 17: Managing Large Selenium Grid](https://reader033.vdocuments.mx/reader033/viewer/2022061218/54b69ccf4a7959ac588b4585/html5/thumbnails/17.jpg)
Stable
• 1.5 years with 0 maintenance
![Page 18: Managing Large Selenium Grid](https://reader033.vdocuments.mx/reader033/viewer/2022061218/54b69ccf4a7959ac588b4585/html5/thumbnails/18.jpg)
Controls
• Complete control from linux shell
![Page 19: Managing Large Selenium Grid](https://reader033.vdocuments.mx/reader033/viewer/2022061218/54b69ccf4a7959ac588b4585/html5/thumbnails/19.jpg)
![Page 20: Managing Large Selenium Grid](https://reader033.vdocuments.mx/reader033/viewer/2022061218/54b69ccf4a7959ac588b4585/html5/thumbnails/20.jpg)
Controls
• Complete control from linux shell• Making new VMs by copy/paste• Windows info stored in text file• Can use any VCS to store configs
![Page 21: Managing Large Selenium Grid](https://reader033.vdocuments.mx/reader033/viewer/2022061218/54b69ccf4a7959ac588b4585/html5/thumbnails/21.jpg)
Example Config
![Page 22: Managing Large Selenium Grid](https://reader033.vdocuments.mx/reader033/viewer/2022061218/54b69ccf4a7959ac588b4585/html5/thumbnails/22.jpg)
![Page 23: Managing Large Selenium Grid](https://reader033.vdocuments.mx/reader033/viewer/2022061218/54b69ccf4a7959ac588b4585/html5/thumbnails/23.jpg)
![Page 24: Managing Large Selenium Grid](https://reader033.vdocuments.mx/reader033/viewer/2022061218/54b69ccf4a7959ac588b4585/html5/thumbnails/24.jpg)
![Page 25: Managing Large Selenium Grid](https://reader033.vdocuments.mx/reader033/viewer/2022061218/54b69ccf4a7959ac588b4585/html5/thumbnails/25.jpg)
Network
• Bridge network• Easy network setup
![Page 26: Managing Large Selenium Grid](https://reader033.vdocuments.mx/reader033/viewer/2022061218/54b69ccf4a7959ac588b4585/html5/thumbnails/26.jpg)
GUI Access
• VNC• Each Windows instance listens on different
port
![Page 27: Managing Large Selenium Grid](https://reader033.vdocuments.mx/reader033/viewer/2022061218/54b69ccf4a7959ac588b4585/html5/thumbnails/27.jpg)
![Page 28: Managing Large Selenium Grid](https://reader033.vdocuments.mx/reader033/viewer/2022061218/54b69ccf4a7959ac588b4585/html5/thumbnails/28.jpg)
Disadvantages
• Need some linux experience• No GUI• Does not have as many features as VMWare• A lot of initial work
![Page 29: Managing Large Selenium Grid](https://reader033.vdocuments.mx/reader033/viewer/2022061218/54b69ccf4a7959ac588b4585/html5/thumbnails/29.jpg)
Proxy
![Page 30: Managing Large Selenium Grid](https://reader033.vdocuments.mx/reader033/viewer/2022061218/54b69ccf4a7959ac588b4585/html5/thumbnails/30.jpg)
Problem
• Many computers• Many datacenters• A lot of firewalls
![Page 31: Managing Large Selenium Grid](https://reader033.vdocuments.mx/reader033/viewer/2022061218/54b69ccf4a7959ac588b4585/html5/thumbnails/31.jpg)
![Page 32: Managing Large Selenium Grid](https://reader033.vdocuments.mx/reader033/viewer/2022061218/54b69ccf4a7959ac588b4585/html5/thumbnails/32.jpg)
![Page 33: Managing Large Selenium Grid](https://reader033.vdocuments.mx/reader033/viewer/2022061218/54b69ccf4a7959ac588b4585/html5/thumbnails/33.jpg)
![Page 34: Managing Large Selenium Grid](https://reader033.vdocuments.mx/reader033/viewer/2022061218/54b69ccf4a7959ac588b4585/html5/thumbnails/34.jpg)
![Page 35: Managing Large Selenium Grid](https://reader033.vdocuments.mx/reader033/viewer/2022061218/54b69ccf4a7959ac588b4585/html5/thumbnails/35.jpg)
![Page 36: Managing Large Selenium Grid](https://reader033.vdocuments.mx/reader033/viewer/2022061218/54b69ccf4a7959ac588b4585/html5/thumbnails/36.jpg)
Reverse tunnel
• SauceConnect
![Page 37: Managing Large Selenium Grid](https://reader033.vdocuments.mx/reader033/viewer/2022061218/54b69ccf4a7959ac588b4585/html5/thumbnails/37.jpg)
![Page 38: Managing Large Selenium Grid](https://reader033.vdocuments.mx/reader033/viewer/2022061218/54b69ccf4a7959ac588b4585/html5/thumbnails/38.jpg)
Reverse tunnel
• SauceConnect• Slow
![Page 39: Managing Large Selenium Grid](https://reader033.vdocuments.mx/reader033/viewer/2022061218/54b69ccf4a7959ac588b4585/html5/thumbnails/39.jpg)
![Page 40: Managing Large Selenium Grid](https://reader033.vdocuments.mx/reader033/viewer/2022061218/54b69ccf4a7959ac588b4585/html5/thumbnails/40.jpg)
Reverse tunnel
• SauceConnect• Slow• Can be Unstable• Machine to port nightmare
![Page 41: Managing Large Selenium Grid](https://reader033.vdocuments.mx/reader033/viewer/2022061218/54b69ccf4a7959ac588b4585/html5/thumbnails/41.jpg)
Proxy Tunnels
![Page 42: Managing Large Selenium Grid](https://reader033.vdocuments.mx/reader033/viewer/2022061218/54b69ccf4a7959ac588b4585/html5/thumbnails/42.jpg)
Browser Proxy Settings
• Set Browser to use 1 port• Set white list of reachable assets
![Page 43: Managing Large Selenium Grid](https://reader033.vdocuments.mx/reader033/viewer/2022061218/54b69ccf4a7959ac588b4585/html5/thumbnails/43.jpg)
![Page 44: Managing Large Selenium Grid](https://reader033.vdocuments.mx/reader033/viewer/2022061218/54b69ccf4a7959ac588b4585/html5/thumbnails/44.jpg)
![Page 45: Managing Large Selenium Grid](https://reader033.vdocuments.mx/reader033/viewer/2022061218/54b69ccf4a7959ac588b4585/html5/thumbnails/45.jpg)
JVM
• -Dhttp.proxyHost=• -Dhttp.proxyPort=• Java -Dhttp.proxyHost=123 -
Dhttp.proxyPort=123 –jar selenium.jar –role hub
![Page 46: Managing Large Selenium Grid](https://reader033.vdocuments.mx/reader033/viewer/2022061218/54b69ccf4a7959ac588b4585/html5/thumbnails/46.jpg)
![Page 47: Managing Large Selenium Grid](https://reader033.vdocuments.mx/reader033/viewer/2022061218/54b69ccf4a7959ac588b4585/html5/thumbnails/47.jpg)
GridExtras
• https://github.com/groupon/Selenium-Grid-Extras
![Page 48: Managing Large Selenium Grid](https://reader033.vdocuments.mx/reader033/viewer/2022061218/54b69ccf4a7959ac588b4585/html5/thumbnails/48.jpg)
Goal
• Stabilize OS in Grid• Give control over grid nodes
![Page 49: Managing Large Selenium Grid](https://reader033.vdocuments.mx/reader033/viewer/2022061218/54b69ccf4a7959ac588b4585/html5/thumbnails/49.jpg)
![Page 50: Managing Large Selenium Grid](https://reader033.vdocuments.mx/reader033/viewer/2022061218/54b69ccf4a7959ac588b4585/html5/thumbnails/50.jpg)
Tie Into Hub
• DefaultProxy class• Pre/After Session hook
![Page 51: Managing Large Selenium Grid](https://reader033.vdocuments.mx/reader033/viewer/2022061218/54b69ccf4a7959ac588b4585/html5/thumbnails/51.jpg)
![Page 52: Managing Large Selenium Grid](https://reader033.vdocuments.mx/reader033/viewer/2022061218/54b69ccf4a7959ac588b4585/html5/thumbnails/52.jpg)
Status Servlet
• Added new servlet for node status• Json return
![Page 53: Managing Large Selenium Grid](https://reader033.vdocuments.mx/reader033/viewer/2022061218/54b69ccf4a7959ac588b4585/html5/thumbnails/53.jpg)
![Page 54: Managing Large Selenium Grid](https://reader033.vdocuments.mx/reader033/viewer/2022061218/54b69ccf4a7959ac588b4585/html5/thumbnails/54.jpg)
Features
• Turn on/off IE Protected mode• Update Webdriver• Update Chrome Driver• Update IEDriver• Kill Any Browser• Check any OS Port• Kill anything on a given port• Reboot OS• Take OS Screenshot• Etc..
![Page 55: Managing Large Selenium Grid](https://reader033.vdocuments.mx/reader033/viewer/2022061218/54b69ccf4a7959ac588b4585/html5/thumbnails/55.jpg)
Help Us out
• Java• Very friendly• https://github.com/groupon/Selenium-Grid-Ex
tras
![Page 56: Managing Large Selenium Grid](https://reader033.vdocuments.mx/reader033/viewer/2022061218/54b69ccf4a7959ac588b4585/html5/thumbnails/56.jpg)
Thank you
• Dima Kovalenko• @dimacus