@wdio/cli:utils:“onPrepare"挂钩中的服务失败 [英] @wdio/cli:utils: A service failed in the 'onPrepare' hook

查看:25
本文介绍了@wdio/cli:utils:“onPrepare"挂钩中的服务失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用saucelabs (wdio5) 运行时出错.

Getting an error while running with saucelabs (wdio5).

2019-10-03T15:23:56.763Z 错误@wdio/cli:utils:onPrepare"钩子中的服务失败

2019-10-03T15:23:56.763Z ERROR @wdio/cli:utils: A service failed in the 'onPrepare' hook

错误:无法启动 Sauce Connect.退出代码 1 信号:空

Error: Could not start Sauce Connect. Exit code 1 signal: null

我已经用最新的更新了@wdio/cli.但是还是出现同样的错误.

I have updated @wdio/cli with latest. But still getting the same error.

我希望测试应该在沙司实验室中运行.

I expect the test should run in saucelabs.

推荐答案

这是因为除了添加到配置文件之外,我们还需要添加sauce username和key作为环境变量.

This is because we need to add sauce username and key as environment variables also in addition to adding them to the configuration files.

    const sauceConfig = Object.assign(baseConfig, {
    user: process.env.SAUCE_USERNAME,
    key: process.env.SAUCE_ACCESS_KEY,
    region: 'eu',
    maxInstances: 50,
});
exports.config = sauceConfig;

请告诉我这是否有帮助,或者您是否已经添加了它.

Please let me know if this helps or if you have already added it.

这篇关于@wdio/cli:utils:“onPrepare"挂钩中的服务失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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