Selenium 2 Grid-知道测试正在使用哪个节点 [英] Selenium 2 Grid - Knowing which node your test is using

查看:85
本文介绍了Selenium 2 Grid-知道测试正在使用哪个节点的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以知道硒网格集线器分配给您的测试的哪个节点?我的测试需要与节点计算机上的其他服务进行对话,以便执行硒不支持的配置.

Is it possible to know which node the selenium grid hub assigned to your test? My tests need to talk to other services on the node machine in order to perform configurations which are not supported by selenium.

标记

推荐答案

通常,您不应该依赖于知道测试在哪台计算机上运行. Grid 2提供了一系列回调侦听器,您可以实现这些回调侦听器以提供计算机配置.但是,如果您确实想查看测试在哪个节点上运行,则可以使用API​​调用之一.可以在中心上找到两个端点:

Generally you shouldn't rely on knowing what machine your test is running on. Grid 2 provides a series of callback listeners that you could implement to provide machine configuration. But, if you really want to see what node a test is running on, you could use one of the API calls. Both endpoints can be found on the hub:

http://localhost:4444/grid/api/proxy

http://localhost:4444/grid/api/testsession

均未记录.但是,如果您查看源代码,则很容易看到它们是如何工作的.您要查看ProxyStatusServlet和TestSessionStatusServlet.

Neither are documented yet. But if you view the source, it's straightforward to see how they work. You want to look at the ProxyStatusServlet and TestSessionStatusServlet.

这篇关于Selenium 2 Grid-知道测试正在使用哪个节点的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆