Adding below Junit dependency in maven pom.xml file do not show any cucumberrunner.java file
But once i add scope like below
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.12</version>
**<scope>test</scope>**
</dependency>
it starts giving error in cucumberrunner.java file
[![enter code here][1]][1]
CodePudding user response:
Cucumber framework is adding JUnit as transitive dependency and this is probably making some conflicts with it. Why do you want to add JUnit 4.12 as a separate dependency?
CodePudding user response:
By adding scope test
you're only putting JUnit on the classpath when executing from src/test
. I guess your runner class is in src/main
.