I want to integrate Galen and Cucumber. My intention is to run Galen specs configuration in Cucumber features steps. To do so i write the following :
public class First extends GalenTestBase{
@Given("^First Step$")
public void firstStep() throws Throwable {
System.out.println("First step runs");
TestDevice device = new TestDevice("mobile", new Dimension(450, 800), asList("mobile"));
load("/");
checkLayout("/specs/welcomePage.spec", device.getTags());
}
}
Which GalenTestBase
is the class with same name from https://github.com/galenframework/galen-sample-java-tests.git and First
(name of the class) is name of feature.
The problem is i getting java.lang.RuntimeException: The driver is not instantiated yet
.
I think it is because driver instantiation which is in @BeforeMethod
of GalenTestNgTestBase
.
Any suggestion how can i achieve such integration?
you could try using my sample project (https://github.com/hypery2k/galen_samples) and see how to pass a driver instance in GalenBaseTest.java