How to maintain Selenium Grid?

时光毁灭记忆、已成空白 提交于 2019-12-12 09:18:10

问题


I have many VMs which are used as part of Grid. Some as RC and some as Hub. Due to the large number of VMs that is being used, it is a big task to maintain the grid now. To change the RC to point to a different hub, I will have to

  1. login to that machine

  2. kill the current RC

  3. run the java command again with a different hub URL

Yes, I can use a batch script to restart all the machines. But what if I just want to change just one machine?

Is it possible to create an application using JAVA RMI which can run the required commands to kill, start, restart the RCs or Hub? Has anyone ever tried to create such an application?


回答1:


you should have a look at selenium grid2.0. It's been designed with exactly what you ask in mind. You can create your own proxy extending either the selenium1 ( RC ) or selenium2 ( webdriver protocol ), and implement a list of interfaces that will allow to react to certain events.

You could for instance :

  • have one unique hub controlling all the nodes and refine the routing by implementing the matcher.

  • update the grid console to have some "reconfigure node" functionality directly there

  • add some rules on each node, for instance restart the VM and the server within it automatically every X test or when a specific event is detected.

I wouldn't start a RMI based solution. If you have VMs, you should have access to the VM API for the solution you choose, and you can use that to revert to a known clean state and restart from there each time. That will ensure you don't have left over crashed browsers and things like that.

thanks, François




回答2:


i know this is old question. How about setting puppet on your VM so you just need to specify one config on master.



来源:https://stackoverflow.com/questions/6250268/how-to-maintain-selenium-grid

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!