Getting Exception in thread "main" for cucumber feature file

35 views
Skip to first unread message

Abhijit Biradar

unread,
Mar 2, 2018, 2:59:33 AM3/2/18
to Cukes
Hi Friends,

I am getting below error message when i run cucumber feature file. Can any one of you please advise me on this. Project details are mentioned below.

Error:

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)
Login.Feature File

@SmokeTest 
Feature: LogIn Action Test
  Description: This feature will test a LogIn and LogOut functionality

  Scenario: Successful Login with Valid Credentials
    Given User is on Home Page
    When User Navigate to LogIn Page
    And User enters UserName and Password
    Then Message displayed Login Successfully
TestRunner.Java

package runners;

import org.junit.runner.RunWith;

import cucumber.api.CucumberOptions;

@RunWith(Cucumber.class)
@CucumberOptions(features = {"MyTest2/feature/Login.feature"})
 
public class TestRunner {

}


Maven POM File

  <modelVersion>4.0.0</modelVersion>
  <groupId>Mytest2</groupId>
  <artifactId>Mytest2</artifactId>
  <version>0.0.1-SNAPSHOT</version> 
  <dependencies>
  <dependency>
<groupId>info.cukes</groupId>
<artifactId>cucumber-java</artifactId>
<version>1.1.5</version>
<scope>test</scope>
</dependency>
 
<dependency>
<groupId>info.cukes</groupId>
<artifactId>cucumber-jvm</artifactId>
<version>1.1.5</version>
<type>pom</type>
</dependency>
 
<dependency>
<groupId>info.cukes</groupId>
<artifactId>cucumber-junit</artifactId>
<version>1.1.5</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>net.sourceforge.cobertura</groupId>
<artifactId>cobertura</artifactId>
<version>2.1.1</version>
</dependency>
<dependency>
<groupId>info.cukes</groupId>
<artifactId>cucumber-jvm-deps</artifactId>
<version>1.0.5</version>
</dependency>
<dependency>
<groupId>net.masterthought</groupId>
<artifactId>cucumber-reporting</artifactId>
<version>1.0.0</version>
</dependency>
<dependency>
<groupId>info.cukes</groupId>
<artifactId>gherkin</artifactId>
<version>2.12.2</version>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-all</artifactId>
<version>2.0.2-beta</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.1</version>
<scope>test</scope>
</dependency>
</dependencies>
</project>


aslak hellesoy

unread,
Mar 2, 2018, 3:12:46 AM3/2/18
to cu...@googlegroups.com
You’re using a 5 year old version (1.1.5). Try 2.3.2.

--
Posting rules: http://cukes.info/posting-rules.html
---
You received this message because you are subscribed to the Google Groups "Cukes" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cukes+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages