Checkout our demo site to practice selenium https://magento.softwaretestingboard.com/

0 like 0 dislike
2.4k views
in Test Automation by
How do I auto restart selenium grid extras nodes

1 Answer

0 like 0 dislike
by The go-to Tester (181 points)

Starting with release 1.3.0 the nodes have an option of automatically restarting after a certain amount of builds have been executed and the node is currently not busy. This helps to keep the nodes in pristine state for longer periods of time, and clears up and browser crashes, which may have occurred. Some setup will be needed to make this feature work as intended.

  1. Setup default login user
  2. Setup default start up task
  3. Give permission to access OS.

Windows

  1. Follow Microsoft's Technical Help
  2. Add start up batch script to StartUp directory or set up a Scheduled Task to start the batch file automatically
  3. No need to setup permission as long as current user can run the following command in the Terminal
shutdown -r -t 1 -f

OS X

  1. Turn on Automatic Login option and make the desired user auto login
  2. Set up the shell script which starts Grid Extras to run automatically.
  3. Modify the /etc/sudoers to contain this line, where the $USER is the current user that will be used for running grid node.
$USER ALL=(ALL) NOPASSWD: /sbin/shutdown

Linux

  1. ...
  2. Set up the shell script which starts Grid Extras to run automatically.
  3. Modify the /etc/sudoers to contain this line, where the $USER is the current user that will be used for running grid node.
$USER ALL=(ALL) NOPASSWD: /sbin/shutdown

 

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


This site is for software testing professionals, where you can ask all your questions and get answers from 1300+ masters of the profession. Click here to submit yours now!

...