I have been playing around with Selenium Cucumber and came across this error message:
Type mismatch: Cannot convert from Class StepDefinition to Class?extends Runner
and here is my code:
package com.cucumber.JUnit;
import cucumber.api.CucumberOptions;
import cucumber.api.junit.Cucumber;
import org.junit.runner.RunWith;
import com.cucumber.steps.StepDefinition;
@RunWith(StepDefinition.class)
@CucumberOptions(
format = { "pretty", "html:report/test-report" },
features = { "src/test/resources/sample.feature" },
glue = { "com.cucumber.steps.StepDefinition" }
)
public class SampleCucumberJUnitRunner {
//Note: As with all Cucumber tests, the .feature file(s) will define what
will actually run.
}
Unable to understand the source of error even though I have imported the class correctly. Am I missing something???
Any help would be appreciable. Thanks in advance!!