7
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 版本和黄瓜 veriosn 1.1.5

4

3 回答 3

2

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

--format

代替

--plugin

最新的 cucumber-jvm 使用文本可以在这里找到。

从这里这里描述的 Maven 存储库中获取最新的 cucumber-jvm 。

于 2016-07-22T01:25:04.117 回答
0

它与 JAR 库(ies)版本不匹配或插件(cucumber-eclipse-plugin)不匹配有关。看这里:https ://groups.google.com/forum/#!topic/cukes/1urjr3ASq78

于 2017-02-15T12:43:05.447 回答
0

我也面临着类似的问题。黄瓜罐很旧。所以我使用 maven 存储库将其更新如下

<properties>
        <cucumber.version>6.10.3</cucumber.version>
</properties>

<dependency>
        <groupId>io.cucumber</groupId>
        <artifactId>cucumber-java</artifactId>
        <version>${cucumber.version}</version>
        <scope>test</scope>
</dependency>

    <dependency>
        <groupId>io.cucumber</groupId>
        <artifactId>cucumber-junit</artifactId>
        <version>${cucumber.version}</version>
        <scope>test</scope>
    </dependency>

注意:您可以在此链接Cucumber jars maven dependency的 maven 存储库中找到最新的 cucumber java

于 2021-05-02T08:32:08.993 回答