如何在量角器中跨功能共享规范文件:
我尝试过关注但不是共享规范,而是跨功能执行所有规范(Login文件夹包含4个规范):
exports.config = {
shardTestFiles: true,
maxSessions: 3,
specs: ['./testExecution/UserManagement/Login/*.js'],
verboseMultiSessions: true,
multiCapabilities: [
{
browserName : 'internet explorer',
seleniumAddress: 'http://localhost:4444/wd/hub'
},
{
browserName : 'chrome',
seleniumAddress: 'http://172.23.230.198:4444/wd/hub'
}
]
}
答案 0 :(得分:0)
在multicapabilities对象中使用shardTestFiles:true
。请看下面的多功能性示例,
multiCapabilities: [
{
shardTestFiles: true,
maxInstances: 1,
browserName: 'chrome',
specs: ['specs/spec1.js','specs/spec2.js']
},
{
shardTestFiles: true,
maxInstances: 1,
sequential: true,
browserName: 'chrome',
specs: ['specs/spec4.js',
'specs/spec5.js',
]
}
]