Search code examples
junitcucumber

Getting "Class<Cucumber> cannot be resolved to a type" for Cucumber.class while setting up JUnit


I'm using Cucumber 1.2.2 jar and getting error "Class cannot be resolved to a type" for the below code. Could someone suggest the solution.

Eclipse Code


Solution

  • You should have this import - import cucumber.api.junit.Cucumber;.

    These options should be displayed by Eclipse on hovering over the error.