量角器 - Shard By Suite [英] Protractor - Shard By Suite
问题描述
看起来 Protractor 目前允许您按文件进行分片.如果每个套件中都有依赖顺序的文件(每个套件都是独立的),是否可以按套件拆分?
It looks like Protractor currently allows you to shard by file. Is there way to split it up by suite, if there are files within each suite that are order dependent (each suite being independent)?
推荐答案
可以通过设置多个功能来实现此功能,每个功能都有自己的规范属性,仅包含来自特定套件的脚本.
This functionality might be achievable by setting multiple capabilities each with their own specs property containing only scripts from a particular suite.
不会对每个功能进行分片,因此每个功能中的所有测试将按顺序运行,但每个功能将并行运行.
Each capability would not be sharded so all tests in each capability would run in sequence but each capability would run parallel.
maxSessions:5
允许 5 个功能同时运行
maxSessions:5
allows 5 capabilities to run at the same time
maxSessions: 5,
multiCapabilities: [
{
browserName: 'chrome',
maxInstances: 1,
specs: [
'../suite1/test1.js',
'../suite1/test2.js',
'...',
],
},
{
browserName: 'chrome',
maxInstances: 1,
specs: [
'../suite2/test1.js',
'../suite2/test2.js',
'...,'
],
},
]
这篇关于量角器 - Shard By Suite的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!