cucumber - 运行 Cucumber 功能文件时出错未知选项 : --plugin

标签 cucumber bdd cucumber-jvm cucumber-junit cucumber-java

Usage: java cucumber.api.cli.Main [options] [ [FILE|DIR][:LINE[:LINE]*] ]+

Options:

-g, --glue PATH                    Where glue code (step definitions and hooks) is loaded from.
-f, --format FORMAT[:PATH_OR_URL]  How to format results. Goes to STDOUT unless PATH_OR_URL is specified.
                                   Built-in FORMAT types: junit, html, pretty, progress, json.
                                   FORMAT can also be a fully qualified class name.
-t, --tags TAG_EXPRESSION          Only run scenarios tagged with tags matching TAG_EXPRESSION.
-n, --name REGEXP                  Only run scenarios whose names match REGEXP.
-d, --[no-]-dry-run                Skip execution of glue code.
-m, --[no-]-monochrome             Don't colour terminal output.
-s, --[no-]-strict                 Treat undefined and pending steps as errors.
    --snippets                     Snippet name: underscore, camelcase
    --dotcucumber PATH_OR_URL      Where to write out runtime information. PATH_OR_URL can be a file system
                                   path or a URL.
-v, --version                      Print version.
-h, --help                         You're looking at it.
Exception in thread "main" cucumber.runtime.CucumberException: Unknown option: --plugin
at cucumber.runtime.RuntimeOptions.parse(RuntimeOptions.java:119)

at cucumber.runtime.RuntimeOptions.<init>(RuntimeOptions.java:50)
at cucumber.runtime.RuntimeOptions.<init>(RuntimeOptions.java:44)
at cucumber.api.cli.Main.run(Main.java:20)
at cucumber.api.cli.Main.main(Main.java:16)

我在运行我的功能文件时收到此错误。
下面给出了 PoM 依赖性,我使用的是 3.2.4 Spring 版本和 Cucumber veriosn 1.1.5

最佳答案

看起来您正在使用正在寻找的非常旧版本的cucumber-jvm

--format

代替
--plugin

最新的cucumber-jvm用法文可以找到here .

从 Maven 存储库中获取最新的 cucumber jvm,如 here 所述或 here .

关于cucumber - 运行 Cucumber 功能文件时出错未知选项 : --plugin,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38477164/

相关文章:

java - Maven Cucumber 报告多个 JSON 文件

java - 设置 cucumber 测试时出现 NoClassDefFoundError

javascript - 强制浏览器结束当前步骤

ruby-on-rails - 错误 'timed out (Capybara::TimeoutError)'

ruby-on-rails - 简化和正确的 RSpec Controller 测试

java - 所有 @Before 和 @After 场景方法都会在场景执行之前被调用

cucumber - cucumber 场景如何根据环境实现不同的数据

cucumber - Karate API 测试 - 在功能文件的 url 中转义 '?'

ruby-on-rails - 检查 cucumber 测试中的网页内容

ruby - 使用 RSpec 测试纯 Ruby bin/my_app.rb 应用程序?