WebdriverIO SevereServiceErrror 没有停止测试 运行

WebdriverIO SevereServiceErrror not stopping the test run

我已经设置了 custom wdio service (as per the documentation) which is used to create a build for the Angles automation dashboard.

作为此服务的一部分,我想使用 SevereServiceError when it is unable to create the build and stop the run. However in my example test 它抛出错误并继续测试 运行。在此处查看日志:

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.

您可以通过克隆 the example repo 和 运行 宁 npm run test.

自己 运行 示例

注意: 这应该会失败,因为它正在寻找 the Angles dashboard.

的本地实例

知道为什么 SevereServiceError 没有停止测试 运行 吗?

updating wdio dependencies and ts-node and typescript 当前版本已解决此问题。测试 运行 现在会在抛出 SeverServiceError 时停止。