WebdriverIO SevereServiceError 未停止测试运​​行

发布于 2025-01-11 17:40:41 字数 2181 浏览 5 评论 0原文

我已经设置了 自定义 wdio 服务< /a> (根据文档)用于创建Angles 自动化仪表板 的构建。

作为此服务的一部分,我想在无法使用时使用 SevereServiceError创建构建并停止运行。但是,在 我的示例测试 中,它会抛出错误并继续测试运行。请参阅此处的日志:

2022-03-05T07:28:36.936Z INFO @wdio/cli:launcher: Run onPrepare hook
2022-03-05T07:28:36.936Z INFO chromedriver: Start Chromedriver (/git/angles/webdriverio-example/node_modules/chromedriver/lib/chromedriver/chromedriver) with args --port=9515 --url-base=/
2022-03-05T07:28:36.982Z ERROR @wdio/cli:utils: A service failed in the 'onPrepare' hook
SevereServiceError: Unable to create a build due to connect ECONNREFUSED 127.0.0.1:3000.
    at /Users/sergios/Documents/git/angles/webdriverio-example/node_modules/angles-wdio-reporter/src/integrations/wdio/AnglesWDIOService.ts:57:15
    at processTicksAndRejections (internal/process/task_queues.js:95:5)
    at async /Users/sergios/Documents/git/angles/webdriverio-example/node_modules/@wdio/cli/build/utils.js:28:17
    at async Promise.all (index 1)
    at async Launcher.run (/Users/sergios/Documents/git/angles/webdriverio-example/node_modules/@wdio/cli/build/launcher.js:86:13)

Continue...
2022-03-05T07:28:36.985Z INFO chromedriver: Starting ChromeDriver 98.0.4758.102 (273bf7ac8c909cde36982d27f66f3c70846a3718-refs/branch-heads/4758@{#1151}) on port 9515
2022-03-05T07:28:36.987Z INFO chromedriver: Only local connections are allowed.

您可以通过克隆 示例存储库 并运行 自行运行示例npm 运行测试

注意:这应该会失败,因为它正在寻找Angles 仪表板的本地实例。

有什么想法为什么 SevereServiceError 没有停止测试运​​行吗?

I have setup a custom wdio service (as per the documentation) which is used to create a build for the Angles automation dashboard.

As part of this service I want to use the SevereServiceError when it is unable to create the build and stop the run. However in my example test it throws the error and simply continues the test run. See logs here:

2022-03-05T07:28:36.936Z INFO @wdio/cli:launcher: Run onPrepare hook
2022-03-05T07:28:36.936Z INFO chromedriver: Start Chromedriver (/git/angles/webdriverio-example/node_modules/chromedriver/lib/chromedriver/chromedriver) with args --port=9515 --url-base=/
2022-03-05T07:28:36.982Z ERROR @wdio/cli:utils: A service failed in the 'onPrepare' hook
SevereServiceError: Unable to create a build due to connect ECONNREFUSED 127.0.0.1:3000.
    at /Users/sergios/Documents/git/angles/webdriverio-example/node_modules/angles-wdio-reporter/src/integrations/wdio/AnglesWDIOService.ts:57:15
    at processTicksAndRejections (internal/process/task_queues.js:95:5)
    at async /Users/sergios/Documents/git/angles/webdriverio-example/node_modules/@wdio/cli/build/utils.js:28:17
    at async Promise.all (index 1)
    at async Launcher.run (/Users/sergios/Documents/git/angles/webdriverio-example/node_modules/@wdio/cli/build/launcher.js:86:13)

Continue...
2022-03-05T07:28:36.985Z INFO chromedriver: Starting ChromeDriver 98.0.4758.102 (273bf7ac8c909cde36982d27f66f3c70846a3718-refs/branch-heads/4758@{#1151}) on port 9515
2022-03-05T07:28:36.987Z INFO chromedriver: Only local connections are allowed.

You can run the example yourself by cloning the example repo and running npm run test.

NOTE: This should fail because it's looking for a local instance of the Angles dashboard.

Any ideas why the SevereServiceError isn't stopping the test run?

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

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

发布评论

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