Getting error during running Cucumber feature file Unknown option: --plugin
Asked Answered
G

3

8
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)

I am getting this error during running my feature file. PoM dependency is given below and I am using 3.2.4 Spring version with cucumber veriosn 1.1.5

Gelid answered 20/7, 2016 at 9:17 Comment(3)
Can you also add your code or explain bit more what are you doing and when are you getting this error!!Biogenesis
It's just simple test feature file it was showing error but when I moved to IntelliJi ,It's working fine. My be it's beacuse of Eclipse IDE ?Gelid
Try updating cucumber version to latest..Biogenesis
F
3

Looks like you are using a very old version of cucumber-jvm that is looking for

--format

instead of

--plugin

The latest cucumber-jvm usage text can be found here.

Get the latest cucumber-jvm from the Maven repository as described here or here.

Flofloat answered 22/7, 2016 at 1:25 Comment(0)
A
0

Either its related with JAR library(ies) version mismatch or plugin(cucumber-eclipse-plugin) mismatch. look Here: https://groups.google.com/forum/#!topic/cukes/1urjr3ASq78

Assess answered 15/2, 2017 at 12:43 Comment(0)
G
0

I was also facing similar issue. The cucumber jars were old. So I updated it as below using maven repository

<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>

NOTE: you can find the latest cucumber java in maven repository at this link Cucumber jars maven dependency

Goines answered 2/5, 2021 at 8:32 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.