I created a RunTest class to run my test scenarios using Cucumber with JUnit. To run the tests before, I need to import into my project the RunWith class (@RunWith) and pass as parameter the Cucumber.class. Then, the RunWith parameter of the class recognizes more of the parameter that is passed to it, no. The eclipse displays the message:
Multiple markers at this line - Class can not be resolved to a type. - Cucumber can not be resolved to a type. - The annotation @RunWith must define the attribute value
I'm using Maven to organize my JARS files. Following is the code and error screens.
My POM.XML
<!-- https://mvnrepository.com/artifact/junit/junit -->
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.12</version>
<scope>test</scope>
</dependency>
<!-- https://mvnrepository.com/artifact/info.cukes/cucumber-java -->
<dependency>
<groupId>info.cukes</groupId>
<artifactId>cucumber-java</artifactId>
<version>1.2.5</version>
</dependency>
<!-- https://mvnrepository.com/artifact/info.cukes/cucumber-junit -->
<dependency>
<groupId>info.cukes</groupId>
<artifactId>cucumber-junit</artifactId>
<version>1.2.5</version>
<scope>test</scope>
</dependency>
<!-- https://mvnrepository.com/artifact/info.cukes/cucumber-core -->
<dependency>
<groupId>info.cukes</groupId>
<artifactId>cucumber-core</artifactId>
<version>1.2.5</version>
</dependency>
<!-- https://mvnrepository.com/artifact/info.cukes/cucumber-jvm -->
<dependency>
<groupId>info.cukes</groupId>
<artifactId>cucumber-jvm</artifactId>
<version>1.2.5</version>
<type>pom</type>
</dependency>
</dependencies>






import cucumber.junit.Cucumber;. - Arnaudpom.xmlyou have the dependencyinfo.cukes:cucumber-jvm:pom:1.2.5which is not in the list of dependencies on any of your screenshots. What happen if you runmvn compileon command line? I created a small project with yourpom.xmlandRunTest.javaand it compiles just ok. - SubOptimal