I created a simple cucumber test that returns a sequence number.
The project builds successfully.
I am using the Intellij IDE.
When I try to run the cucumber test, I get this error:
Exception in thread “main” java.lang.NoClassDefFoundError:
This is a gradle build and I have these dependencies listed below:
testCompile('io.cucumber:cucumber-java8:3.0.2') testCompile('io.cucumber:cucumber-junit:3.0.2') testCompile('io.cucumber:cucumber-spring:3.0.2') testCompile('io.cucumber:cucumber-jvm:3.0.2')
In other posts, it states to remove transitive dependencies, such as the cucumber-java, junit and jvm but I still get the error.
I also tried adding gherkin: `io.
cucumber:gherkin:3.2.0 but it gives the same error.
I found a table referring to the version of gherkin that goes with cucumber and for cucumber 3x there is no gherkin version to add.
So I am at a loss as to way I am getting this error.