Question

Running a .feature file gives me the following error:

  " >....< cucumber.cli.Main --format org.jetbrains.plugins.cucumber.java.run.CucumberJvmSMFormatter --monochrome --glue C:/projects/selenium-parent/selenium/src/test/resources/InformationPage.feature
Testing started at 09:20 ...


    Exception in thread "main" java.lang.reflect.UndeclaredThrowableException
        at com.sun.proxy.$Proxy13.feature(Unknown Source)
        at cucumber.runtime.model.CucumberFeature.run(CucumberFeature.java:108)
        at cucumber.runtime.Runtime.run(Runtime.java:94)
        at cucumber.runtime.Runtime.run(Runtime.java:82)
        at cucumber.cli.Main.run(Main.java:20)
        at cucumber.cli.Main.main(Main.java:12)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:606)
        at com.intellij.rt.execution.application.AppMain.main(AppMain.java:120)
    Caused by: java.lang.reflect.InvocationTargetException
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:606)
        at cucumber.runtime.RuntimeOptions$1.invoke(RuntimeOptions.java:94)
        ... 11 more
    Caused by: java.lang.NoSuchMethodError: gherkin.formatter.model.Feature.getLine()Ljava/lang/Integer;
        at org.jetbrains.plugins.cucumber.java.run.CucumberJvmSMFormatter.feature(CucumberJvmSMFormatter.java:89)
        ... 16 more

    Process finished with exit code 1
    Empty test suite.

The feature file works if I invoke it via a JUnit test. So what why is it reporting Empty test suite?

Feature: Information Page

Scenario: Has expected components
    Given I navigate to the information page
    Then I should see the table component
Was it helpful?

Solution

This was due to me not having the latest cucumber-jvm plugin installed.

OTHER TIPS

I had

Caused by: java.lang.ClassNotFoundException: org.jetbrains.plugins.cucumber.java.run.CucumberJvm3SMFormatter

I needed this in the pom

<dependency>
        <groupId>info.cukes</groupId>
        <artifactId>cucumber-java</artifactId>
        <version>1.2.2</version>
    </dependency>
    <dependency>
        <groupId>info.cukes</groupId>
        <artifactId>cucumber-junit</artifactId>
        <version>1.2.2</version>
    </dependency>

and needed cucumber for java plugin installed

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top