如何维护Selenium Grid?
我有许多虚拟机用作网格的一部分。有的作为 RC,有的作为 Hub。由于正在使用大量虚拟机,现在维护网格是一项艰巨的任务。要更改 RC 以指向不同的集线器,我必须
登录到该计算机
终止当前的 RC
运行使用不同的集线器 URL 再次运行 java 命令
是的,我可以使用批处理脚本重新启动所有计算机。但如果我只想更换一台机器怎么办?
是否可以使用 JAVA RMI 创建一个应用程序,该应用程序可以运行所需的命令来终止、启动、重新启动 RC 或集线器?有没有人尝试过创建这样的应用程序?
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
login to that machine
kill the current RC
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?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
你应该看看selenium grid2.0。它的设计完全符合您的要求。
您可以创建自己的代理,扩展 selenium1 ( RC ) 或 selenium2 ( webdriver 协议 ),并实现允许对某些事件做出反应的接口列表。
例如,您可以:
拥有一个唯一的集线器来控制所有节点,并通过实现匹配器来优化路由。
更新网格控制台以直接在那里拥有一些“重新配置节点”功能
在每个节点上添加一些规则,例如重新启动虚拟机以及其中的服务器在每次 X 测试或检测到特定事件时自动启动。
我不会启动基于 RMI 的解决方案。如果您有虚拟机,则应该有权访问所选解决方案的虚拟机 API,并且可以使用它恢复到已知的干净状态并每次从那里重新启动。这将确保您不会留下崩溃的浏览器之类的东西。
谢谢,
弗朗索瓦
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
我知道这是老问题了。如何在虚拟机上设置 puppet,这样您只需在 master 上指定一个配置即可。
i know this is old question. How about setting puppet on your VM so you just need to specify one config on master.