I am trying to run a cucumber test It is an eclipse plugin Junit plugin test. It runs fine but when I want to run it as a junit plugin test ,then I get below exception.
ucumber.runtime.CucumberException: Expected a file URL:bundleresource://174.fwk1558712965:3/cucumber/runtime/ at cucumber.runtime.io.Helpers.filePath(Helpers.java:19) at cucumber.runtime.io.FileResourceIteratorFactory.createIterator(FileResourceIteratorFactory.java:28) at cucumber.runtime.io.ZipThenFileResourceIteratorFactory.createIterator(ZipThenFileResourceIteratorFactory.java:23)
import org.junit.runner.RunWith;
import cucumber.api.CucumberOptions;
import cucumber.api.junit.Cucumber;
@RunWith(Cucumber.class)
@CucumberOptions( features={"resources"},
glue= {"Steps"})
public class RunCucumberTest {
}
import org.junit.Test;
import cucumber.api.java.en.Given;
public class StepDefinitions {
@Given("I want to write a step with precondition")
public void myTest() throws Exception {
System.out.println("Sample output");
System.out.println("Sample output 2");
}
}
Aucun commentaire:
Enregistrer un commentaire