Is there a way to schedule shutdown of Selenium nodes without breaking tests?

I installed selenium grid with three different servers running the nodes as Windows services. I need to restart these computers regularly to avoid memory leaks and performance. To do this, I need to schedule a task to turn off the nodes on the server and restart until the tests are transferred to the other servers. Then repeat the same process with scheduled jobs on other servers.

Is there a way to close the selenium node after completing the current test? Or get the status of a specific node so that I can check each one myself in the scheduled task to make sure that the node does not run the test before I turn it off?

+4
source share
2 answers

You can check the number of active sessions by querying each node with the command /sessions:

http://127.0.0.1:4444/wd/hub/sessions

Answer:

{"state":"success","sessionId":null,"hCode":3217742,"value":[],"class":"org.openqa.selenium.remote.Response","status":0}
+2
source

@ Sh3mm

Some time ago, I wrote a blog post, which basically talks about how to build a "Self Healing Grid", which is what you essentially after.

You can read my blog post here .

We basically used the same approach when working on the SeLion grid. SeLion Grid offers a few more features. Read more about it here.

, , , GroupOn Grid Extras.

+1

All Articles