ECONNREFUSED 问题是 (i)WebDriver 的已知问题吗?

发布于 2024-12-03 13:40:59 字数 660 浏览 8 评论 0原文

在我当前的项目中,我们使用 iWebDriver 在 CI 服务器上运行验收测试。

偶尔,我们会看到错误:

Connection refused - connect(2) (Errno::ECONNREFUSED)

到目前为止,我们还没有发现此故障的模式;每当我们遇到它时,我们只需重新启动构建,通常就会成功运行。我想说这种情况发生的概率大约为 10%。

在每个人都指责我忽略了一个真正的问题之前:每当测试失败时,我们都会捕获屏幕截图。每当发生此特定错误时,根据捕获的屏幕截图,似乎并不存在实际问题。它与简单的超时错误不同(例如,未及时找到元素);在这种情况下,我们会看到不同的消息:执行已过期 (Timeout::Error)

我们都假设这是由于 WebDriver 本身的一些不稳定的错误造成的。这促使我实现一个脚本,该脚本仅检测上述错误消息并在检测到错误消息时重新启动构建,否则会产生真正的失败。 (实际上,我已经这样做了;我只是还没有配置我们的构建服务器来使用它。)

其他人是否见过这个间歇性错误?这是一个已知问题吗?它是否确实表明了我们应该调查的真正问题(在这种情况下,我们从哪里开始)?

On my current project we're using iWebDriver to run acceptance tests on our CI server.

Occasionally, we see the error:

Connection refused - connect(2) (Errno::ECONNREFUSED)

Thus far, we have found no pattern to this failure; whenever we encounter it, we simply restart the build and it generally runs successfully. I'd say this happens roughly 10% of the time.

Before everybody jumps on me for ignoring a real problem: we capture screenshots whenever there is a test failure. Whenever this particular error occurs, there doesn't appear to be an actual problem based on the captured screenshot. It is not the same as a simple timeout error (where, e.g., an element isn't found in time); in that case we see a different message: execution expired (Timeout::Error).

We're all kind of under the assumption that this is due to some erratic bug in WebDriver itself. Which tempts me to implement a script that simply detects the above error message and restarts the build if it's detected but otherwise yields real failures. (Actually, I've already done that; I simply haven't configured our build server to use it, yet.)

Have others seen this intermittent error? Is it a known issue? Does it actually indicate a real problem that we should investigate on our end (in which case, where do we start)?

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

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

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文