Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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

like image 284
Pankaj Kumar Avatar asked Jul 20 '16 09:07

Pankaj Kumar


People also ask

What is feature option in Cucumber?

The feature file is the essential segment of cucumber tool, which is used to write acceptance steps for automation testing. Acceptance steps generally follow the application specification. A feature file is usually a common file which stores feature, scenarios, and feature description to be tested.

Why step definition is not recognized in Cucumber?

If Cucumber is telling you that your steps are undefined, when you have defined step definitions, this means that Cucumber cannot find your step definitions. You'll need to make sure to specify the path to your step definitions (glue path) correctly.


1 Answers

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.

like image 146
MikeJRamsey56 Avatar answered Oct 10 '22 06:10

MikeJRamsey56