Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
Scaling and Managing Selenium 
Grid 
Dima Kovalenko 
@dimacus
• Note to self, this slide should be completely 
blank, NO TEXT of any sort!
Shameless Plug 
ISBN: 9781783982707 
https://www.packtpub.com/web-development/selenium-design-patterns-and-best-practices
Explaining Grid 
• Dumb Nodes
Explaining Grid 
• Dumb Nodes 
• Even Dumber Hub
Hub is a Glorified Proxy Server 
• HUB is an HTTP Proxy 
• That tracks node count 
– Does not know much else about nodes
Getting Priorities Right 
• Stability 
• Speed 
• Coverage
Stability 
• Become a Sys Admin
Stability 
• Become a Sys Admin 
• Move as much to Linux as possible
Stability 
• Become a Sys Admin 
• Move as much to Linux as possible 
• Only 1 test at the time! 
- At least for 
IE 
Safa...
Stability 
• Become a Sys Admin 
• Move as much to Linux as possible 
• Only 1 test at the time! 
- Shared resources at OS...
Stability 
• Become a Sys Admin 
• Move as much to Linux as possible 
• Only 1 test at the time! 
• Configuration as code ...
Configuration Management 
• Node Configs 
– Grid Hub Configs 
– Grid Node Configs 
– Store In Git
Configuration Management 
• Node Configs 
– Grid Hub Configs 
– Grid Node Configs 
– Store In Git 
• OS Configs 
– Crons 
...
Speed 
• Smaller Nodes 
– Better to have 10 computers with 1 browser 
• It’s ok to use low end machines
Speed 
• Smaller Nodes 
– Better to have 10 computers with 1 browser 
• It’s ok to use low end machines 
– Take performanc...
Coverage 
• Can we add IE6 and 7 to the Grid?
Coverage
Coverage 
• More maintenance 
• IE8 takes 50% of free time 
• IE9 or > is much Safer to use
International Buy Jim Evans a BEER 
day!
International Buy Jim Evans a BEER 
day!
International Buy Jim Evans a BEER 
day!
More On Stability 
• Don’t Use RC 
– java -jar selenium.jar -role node
More On Stability 
• Don’t Use RC 
• Use WebDriver 
–java -jar selenium.jar -role wd
More On Stability 
• Replace Internet Explorer with Batch file 
• Create Crons (Scheduled Tasks) 
– Periodically Restart G...
More On Stability 
• Replace Internet Explorer with Batch file 
– Cleans up Cookies, Cache, etc 
– Launches Internet Explo...
More On Stability 
• Replace Internet Explorer with Batch file 
• Create Crons (Scheduled Tasks) 
• Auto login & Auto Star...
More On Stability 
• Replace Internet Explorer with Batch file 
• Create Crons (Scheduled Tasks) 
• Auto login & Auto Star...
Selenium Grid Extras 
• 1 year old
Selenium Grid Extras 
• https://github.com/groupon/Selenium-Grid- 
Extras
Goal of the Project 
• Document Grid Stability with code
Goal of the Project 
• Document Grid Stability with code 
– (Poorly written Java code that is) 
• Make the setup and maint...
Features to improve stability 
• Automatically Set IE Protected Security Zone 
each reboot 
• Move the mouse out of the wa...
Latest Features 
• Restart node every X builds, when node is free 
• Jenkins Plugin 
• Video recording of test (Work in pr...
Optionally Reboot OS 
• Windows reboot not optional! 
• Improves speed and test stability 
• Prevents this:
Video Recording 
• (Work in Progress)
Demo
Jenkins Plugin 
• (Work in Progress)
Find IE Crashes at a Glance
Questions?
Scaling and Managing Selenium Grid
Scaling and Managing Selenium Grid
Scaling and Managing Selenium Grid
Scaling and Managing Selenium Grid
Scaling and Managing Selenium Grid
Scaling and Managing Selenium Grid
Upcoming SlideShare
Loading in …5
×

Scaling and Managing Selenium Grid

5,799 views

Published on

A presentation given at 2014 Selenium Conference in Bangalore talks about common steps to help set up and manage a Selenium Grid environment.

Published in: Technology

Scaling and Managing Selenium Grid

  1. 1. Scaling and Managing Selenium Grid Dima Kovalenko @dimacus
  2. 2. • Note to self, this slide should be completely blank, NO TEXT of any sort!
  3. 3. Shameless Plug ISBN: 9781783982707 https://www.packtpub.com/web-development/selenium-design-patterns-and-best-practices
  4. 4. Explaining Grid • Dumb Nodes
  5. 5. Explaining Grid • Dumb Nodes • Even Dumber Hub
  6. 6. Hub is a Glorified Proxy Server • HUB is an HTTP Proxy • That tracks node count – Does not know much else about nodes
  7. 7. Getting Priorities Right • Stability • Speed • Coverage
  8. 8. Stability • Become a Sys Admin
  9. 9. Stability • Become a Sys Admin • Move as much to Linux as possible
  10. 10. Stability • Become a Sys Admin • Move as much to Linux as possible • Only 1 test at the time! - At least for IE Safari
  11. 11. Stability • Become a Sys Admin • Move as much to Linux as possible • Only 1 test at the time! - Shared resources at OS level
  12. 12. Stability • Become a Sys Admin • Move as much to Linux as possible • Only 1 test at the time! • Configuration as code – Git – Chef – Puppet
  13. 13. Configuration Management • Node Configs – Grid Hub Configs – Grid Node Configs – Store In Git
  14. 14. Configuration Management • Node Configs – Grid Hub Configs – Grid Node Configs – Store In Git • OS Configs – Crons – Versions • Browsers • Java • Etc..
  15. 15. Speed • Smaller Nodes – Better to have 10 computers with 1 browser • It’s ok to use low end machines
  16. 16. 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
  17. 17. Coverage • Can we add IE6 and 7 to the Grid?
  18. 18. Coverage
  19. 19. Coverage • More maintenance • IE8 takes 50% of free time • IE9 or > is much Safer to use
  20. 20. International Buy Jim Evans a BEER day!
  21. 21. International Buy Jim Evans a BEER day!
  22. 22. International Buy Jim Evans a BEER day!
  23. 23. More On Stability • Don’t Use RC – java -jar selenium.jar -role node
  24. 24. More On Stability • Don’t Use RC • Use WebDriver –java -jar selenium.jar -role wd
  25. 25. More On Stability • Replace Internet Explorer with Batch file • Create Crons (Scheduled Tasks) – Periodically Restart Grid node (JAR) – Periodically Restart Computer
  26. 26. More On Stability • Replace Internet Explorer with Batch file – Cleans up Cookies, Cache, etc – Launches Internet Explorere
  27. 27. 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
  28. 28. More On Stability • Replace Internet Explorer with Batch file • Create Crons (Scheduled Tasks) • Auto login & Auto Start at login • Etc.. Etc.. Etc..
  29. 29. Selenium Grid Extras • 1 year old
  30. 30. Selenium Grid Extras • https://github.com/groupon/Selenium-Grid- Extras
  31. 31. Goal of the Project • Document Grid Stability with code
  32. 32. Goal of the Project • Document Grid Stability with code – (Poorly written Java code that is) • Make the setup and maintenance of the grid simple
  33. 33. 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
  34. 34. Latest Features • Restart node every X builds, when node is free • Jenkins Plugin • Video recording of test (Work in progress)
  35. 35. Optionally Reboot OS • Windows reboot not optional! • Improves speed and test stability • Prevents this:
  36. 36. Video Recording • (Work in Progress)
  37. 37. Demo
  38. 38. Jenkins Plugin • (Work in Progress)
  39. 39. Find IE Crashes at a Glance
  40. 40. Questions?

×