Protractor 使用cucumber运行量角器时,如何仅运行一个功能文件?
我有多个功能文件,我真的很想只运行一个文件、一个场景或一个标记。 我知道我可以在cucumberConf.js中提供一个规范文件,但我希望在不修改cucumberConf.js的情况下运行一次。Protractor 使用cucumber运行量角器时,如何仅运行一个功能文件?,protractor,cucumberjs,Protractor,Cucumberjs,我有多个功能文件,我真的很想只运行一个文件、一个场景或一个标记。 我知道我可以在cucumberConf.js中提供一个规范文件,但我希望在不修改cucumberConf.js的情况下运行一次。 运行量角器时需要输入哪些参数?最简单的方法是使用--specs选项 量角器——量角器配置中的specs=specs/testA.js e2e-conf.js: cucumberOpts: { ... tags: [ "@runThis", "@runTha
运行量角器时需要输入哪些参数?最简单的方法是使用
--specs
选项
量角器——量角器配置中的specs=specs/testA.js e2e-conf.js
:
cucumberOpts: {
...
tags: [
"@runThis",
"@runThat",
"~@ignoreThis"
];
...
},
在要素文件中
@runThis
Scenario: Run this Scenario
Given user does some action
Then something should happen
@ignoreThis
Scenario: ignore this Scenario
Given user does some action
Then something should happen
使用量角器配置文件中的规格数组。例如
specs: [ 'test/features/xxx.feature' ],