【发布时间】:2018-05-26 16:59:35
【问题描述】:
我很少有使用@test 和@high 标记的场景。当我使用具有以下语法的单个标签运行时,它可以正常工作。
package.json
"smoke": "babel-node node_modules/protractor/bin/protractor protractorConf.js --presets-env --cucumberOpts.tags \"@smoke\"",
但是当我运行它时,运行带有@test 和@high 标记的场景时,什么都没有发生,并且调用了0 个场景。
package.json
"high": "babel-node node_modules/protractor/bin/protractor protractorConf.js --presets-env --cucumberOpts.tags \"@test,@high\""
我尝试了以下许多选项,但没有任何效果。
--cucumberOpts.tags "@test" --cucumberOpts.tags "@high"
--cucumberOpts.tags @test --cucumberOpts.tags @high
--cucumberOpts.tags "(@test and @high)"
--cucumberOpts.tags "@test and @high"
请帮助我了解如何运行多个 AND 和 OR 场景。以下是我的包版本。
"cucumber": "^4.2.1",
"protractor": "^5.3.2",
"protractor-cucumber-framework": "^5.0.0"
下面是我调用命令时的实际输出。
c:\Personal\ATDD (protractortest@1.0.0)
λ npm run high
> protractortest@1.0.0 high c:\Personal\ATDD
> babel-node node_modules/protractor/bin/protractor protractorConf.js --presets-env --cucumberOpts.tags "@test,@high"
(node:8100) [DEP0022] DeprecationWarning: os.tmpDir() is deprecated. Use os.tmpdir() instead.
[11:48:21] I/launcher - Running 1 instances of WebDriver
[11:48:21] I/hosted - Using the selenium server at http://localhost:4444/wd/hub
(node:8100) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.
0 scenarios
0 steps
0m00.000s
Cucumber HTML report c:\Personal\ATDD\reports\html/cucumber_reporter.html generated successfully.
[11:48:25] I/launcher - 0 instance(s) of WebDriver still running
[11:48:25] I/launcher - chrome #01 passed
【问题讨论】:
标签: protractor cucumber cucumberjs