Selenium Grid 并不总是使用其所有注册的 RC,为什么?

发布于 2024-09-02 11:28:07 字数 849 浏览 4 评论 0原文

我的 Selenium Grid 设置如下(所有虚拟机)

VM1 - Windows 7 x64 Windows XP x32 - Grid Hub + 2 个注册默认 *firefox 环境的 RC

VM2 - Windows XP x32 - 2 个注册默认 * 的 RC firefox 环境

VM3 - Windows XP x32 - 2 个 RC 注册默认 *firefox 环境

我很高兴使用 Mbunit 和 Gallio 来驱动 Grid,但我的问题是有时 Grid hub 将停止将执行传递给 1 个或多个 RC ,尽管它们在中心控制台上显示。他们似乎很乐意将心跳保持在中心,但他们再也不会被要求做任何更多的工作。这是在他们在测试运行的早期执行测试之后发生的。

有人知道为什么会发生这种情况吗?在每种情况下,我都观察到这种行为,RC 执行的最后一个测试,然后似乎被集线器忽略,通过,并且会话成功关闭。有趣的是,每当发生超过 1 个 RC 时,(到目前为止)它总是在同一虚拟机上运行的一对。但他们仍设法保持心跳,因此这不是网络连接问题。

任何帮助将不胜感激!

更新:经过进一步尝试排除故障后,我现在发现了其他问题。首先,为了保持一致性并排除集线器在较新操作系统上运行时可能出现的任何问题,我将 Win7 虚拟机更换为基于 XP 的虚拟机。我已更新上述内容以反映这一变化。

进行此更改后,集线器现在始终只使用 6 个注册 RC 中的至多 5 个。未使用的 RC 始终是机器上最后向集线器注册的两个 RC 之一。因此,如果我在 VM1 上启动集线器,在 VM2 和 VM3 上启动 RC,然后在 VM1 上启动 RC,则 VM1 上的两个 RC 之一将永远不会被使用。

My Selenium Grid setup is as follows (all VMs)

VM1 - Windows 7 x64 Windows XP x32 - Grid Hub + 2 RCs registering the default *firefox environment

VM2 - Windows XP x32 - 2 RCs registering the default *firefox environment

VM3 - Windows XP x32 - 2 RCs registering the default *firefox environment

I'm happily using Mbunit and Gallio to drive the Grid, but my problem is that sometimes the Grid hub will stop passing executions over to 1 or more of the RCs, despite their showing available on the hub console. They seem to be happily maintaining their heartbeat back to the hub, but they're never asked to do any more work. This is after they had been executing tests earlier in the test run.

Does anybody have any ideas why this should happen? In every case I've observed this behaviour, the last test an RC executed, before it then seemingly gets ignored by the hub, passed, and the session was successfully closed. Interestingly, whenever it happens to more than 1 of the RCs, its always (so far) been the pair that are running on the same VM. Yet they're managing to maintain their heartbeat, so it isn't a network connectivity problem.

Any help would be greatly appreciated!

UPDATE: After further attempts to troubleshoot, I've now discovered something else. To begin with I swapped out my Win7 VM for an XP based one, for the sake of consistency and to rule out any issues that the hub might have running on the newer OS. I've updated the above to reflect that change.

After that change, the hub is now consistently only ever using at most 5 of the 6 registered RCs. Which RC isn't used is consistently one of the two on the machine that is the last to register with the hub. So if I start the hub on VM1, start the RCs on VM2 and VM3, and then start the RCs on VM1, one of the two RCs on VM1 will never be used.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

贪了杯 2024-09-09 11:28:07

这也许是一个愚蠢的问题,但所有 RC 都在给定机器上的唯一端口上运行,对吧?您能否远程登录到 RC 的端口,该端口没有执行任何 GET / 问题?

另外,您使用什么版本的 Selenium Grid?

This is perhaps a foolish question, but all RCs are running on unique ports on that given machine, right? Can you telnet to the port of the RC that isn't doing anything an issue a GET /?

Also, what version of Selenium Grid are you using?

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文