Skip to content
Advertisement

Error while running cucumber in junit

Hi i am new to cucumber java. i am trying to run a simple cucumber feature test. below are my feature file, step definition file and junit runner file. but i am not able to run the test succesfully in cucumber-java,cucumber-junit 1.1.6 version.

Feature file

JavaScript

Stepdefinition file

JavaScript

Cucumber runner file

JavaScript

I am getting below error:

JavaScript

POM.xml

JavaScript

But when i am running with 1.0.14 version of the same i am able to run it successfully. whys is it so? does 1.1.6 version has some bug in it to run? TIA!!!

Advertisement

Answer

The error means that cucumber.runtime.RuntimeOptions has no constructor which takes a List as argument.

Since all classes are part of cucumber, I suspect a bug in the release. Run mvn dependency:tree and search the output for cucumber. Make sure that you have only a single version of the dependency.

If your classpath is good, try an older version.

If that works, download the sources for cucumber and compile them. Does it work now? If so, open a bug report telling the Cucumber project that the latest release wasn’t compile correctly.

User contributions licensed under: CC BY-SA
3 People found this is helpful
Advertisement