node.js - 尝试使用 nightwatch 运行场景时出现未知选项 `--tag'

标签 node.js cucumber nightwatch.js

我正在使用以下命令使用 nightwatch 运行测试用例之一,但出现以下错误 npm run test:cucumber -- --tag Seleniumeasy

automation@1.0.0测试: cucumber C:\Users****\Desktop\Automation

mkdirp report && cucumber-js --require cucumber.conf.js --require step-definitions --format node_modules/cucumber-pretty --format json:report/cucumber_report.json "--tag" "Seleniumeasy"

错误:未知选项--tag' npm 错误!代码 生命周期 npm 错误!错误号1 npm 错误! Automation@1.0.0 测试:cucumber:mkdirp 报告 && cucumber-js --require cucumber.conf.js --require 步骤定义 --format node_modules/cucumber-pretty --format json:report/cucumber_report。 json“--tag”“Seleniumeasy”` npm 错误!退出状态1 npm 错误! npm 错误! Automation@1.0.0 test:cucumber 脚本失败。 npm 错误!这可能不是 npm 的问题。上面可能有额外的日志输出。

最佳答案

这对我有用

npm run test:cucumber -- --tags "@Seleniumeasy"

关于node.js - 尝试使用 nightwatch 运行场景时出现未知选项 `--tag',我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58075034/

相关文章:

google-chrome - 使用 Google Chrome Headless 模式强制执行屏幕截图分辨率

javascript - 守夜人 : Is there a way to find out if executeAsync has executed the javascript?

node.js - 如何设计一个可扩展的rpc调用监听器?

javascript - 为 NextJS 正确编码静态图像数据

java - 如何在 Cucumber java 中使用嵌套场景大纲

java - CucumberOptions Java 命令行

javascript - 无法使用 nightwatch 中的元素迭代元素

node.js - Express.js 文件上传 : 60s timeouts and HTTP connection timeout errors

node.js - 如何从mapReduce mongoose 中的键获取大约值?

java - 如何集成 Karate 和 cucumber 并从单个文件/类调用两者