跳到主要内容

Testingbot 服务

WebdriverIO 服务,提供与 TestingBot 更好的集成。它会更新作业元数据('name'、'passed'、'tags'、'public'、'build'、'extra'),并在需要时运行 TestingBot Tunnel。

安装

最简单的方法是通过以下方式将 @wdio/testingbot-service 作为 devDependency 保存在你的 package.json 中:

npm install @wdio/testingbot-service --save-dev

有关如何安装 WebdriverIO 的说明可以在这里找到。

配置

为了使用该服务,你需要在 wdio.conf.js 文件中设置 userkey,并将 hostname 选项设置为 hub.testingbot.com。如果你想使用 TestingBot Tunnel,你需要设置 tbTunnel: true

// wdio.conf.js
export const config = {
// ...
user: process.env.TB_KEY,
key: process.env.TB_SECRET,
services: [
['testingbot', {
tbTunnel: true
}]
],
// ...
};

选项

要授权 TestingBot 服务,你的配置需要包含 userkey 选项。

tbTunnel

如果设为 true,它将运行 TestingBot Tunnel 并在运行浏览器测试的 TestingBot 虚拟机之间打开安全连接。

类型:Boolean
默认值:false

tbTunnelOpts

应用 TestingBot Tunnel 选项(例如更改端口号或日志文件设置)。有关更多信息,请参见此列表

类型:Object
默认值:{}

Welcome! How can I help?

WebdriverIO AI Copilot