【发布时间】:2019-03-17 18:22:13
【问题描述】:
我正在使用 wdio 运行测试。我将 maxInstances 减少到 1。但是 wdio 日志记录表明它会在每个规范文件之前创建一个新会话。如何在单个浏览器会话中运行所有 webdriver.io 规范文件?提前谢谢你。
wdio.conf.js 是:
exports.config = {
specs: ['./test/specs/**/*.js'],
maxInstances: 1,
capabilities: [{
maxInstances: 1,
browserName: 'chrome',
}],
sync: true,
logLevel: 'verbose',
coloredLogs: true,
screenshotPath: './errorShots/',
baseUrl: process.env.ROOT_URL,
waitforTimeout: 10000,
connectionRetryTimeout: 90000,
connectionRetryCount: 3,
services: ['chromedriver'],
framework: 'mocha',
reporters: ['dot', 'spec', 'allure'],
mochaOpts: {
ui: 'bdd',
timeout: 99999999
},
}
【问题讨论】:
标签: session webdriver-io