I was trying to implement global hooks in serenity-bdd
project. As I browse through found below links and none of them worked for me. Some of them not specific to Serenity-BDD though.
package mypackage;
import org.junit.runner.RunWith;
import cucumber.api.CucumberOptions;
import net.serenitybdd.cucumber.CucumberWithSerenity;
@RunWith(CucumberWithSerenity.class)
@CucumberOptions(
features = "src/test/resources/features",
glue = {"MyProj.cucumber.stepdefinition"},
public class MyTest {
@Before
public static void setUp() {
//do something here
}
}
My Maven versions are: