Not able to run a feature file in eclipse with Run as feature

7,164 views
Skip to first unread message

Vino Maddy

unread,
Jun 17, 2016, 8:38:42 AM6/17/16
to Cukes
when i run a cucumber feature file in eclipse using run as Feature is shows below error, i am so worried about this , trying to troubleshoot this for past 1 month :(

Below is the error which i get:

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 [underscore|camelcase]  Naming convention for generated snippets. Defaults to underscore.
        --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:130)
at cucumber.runtime.RuntimeOptions.<init>(RuntimeOptions.java:77)
at cucumber.runtime.RuntimeOptions.<init>(RuntimeOptions.java:70)
at cucumber.runtime.RuntimeOptions.<init>(RuntimeOptions.java:62)
at cucumber.api.cli.Main.run(Main.java:31)
at cucumber.api.cli.Main.main(Main.java:18)




--------------------------------------------------------------------------------

Note: but i can run the same feature file using junit runner.

Any help would be much appreciated.

Thanks,
Vinoth

Björn Rasmusson

unread,
Jun 19, 2016, 4:26:18 AM6/19/16
to Cukes
Hi,

The version to cucumber-ecplise-plugin you are using requires Cucumber-JVM v1.2.0 or later.
The error message above says that you are using an earlier version of Cucumber-JVM.
You need either to upgrade the version of Cucumber-JVM, or to downgrade the version of the cucumber-eclipse-plugin.

Regards
Björn
 

Vino Maddy

unread,
Jun 21, 2016, 2:37:07 AM6/21/16
to Cukes












Hi ,

the below are the version i am using

junit - 4.11
cucumber-core - 1.1.7
httpclient - 4.3.3. 
cucumber-java - 1.1.6
cucumber - junit - 1.1.6
selenium-java - 2.41.0
commons- configuration - 1.10 

------------------------------
java version 1.7
eclipse kepler


please help me.

Michael Odibo

unread,
Oct 2, 2016, 3:09:02 AM10/2/16
to Cukes
Hi Vino / Any one,

I a m having the same issues and it's driving me crazy. Did you ever get this resolved? Please HELP!!

Step 'I navigate to the zoo website' does not have a matching glue code
Step 'I click on the adoption link' does not have a matching glue code
Step 'I click on the check button' does not have a matching glue code


Exception in thread "main" 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.

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)

Thanks

Michael

Björn Rasmusson

unread,
Oct 2, 2016, 4:10:22 AM10/2/16
to Cukes
Michael Odibo wrote:
Hi Vino / Any one,

I a m having the same issues and it's driving me crazy. Did you ever get this resolved? Please HELP!!

Mickael,

If you read the tread carefully you'll see that I already said what needs to be done.
Read the tread again and not especially the sentence

Vino Maddy

unread,
Oct 3, 2016, 6:43:09 AM10/3/16
to Cukes
Hi,
Its again the version of the Cucumber jars you are using. Please read this thread you will find the versions need to be used for all the jars.
Update this in your Pom.xml, if you are using Maven.
 
Reply all
Reply to author
Forward
0 new messages