automation_user
3 years agoNew Member
Unable to invoke global hooks for cucumber java
I have a test project that is cucumber java based. I have 3 packages under src/test/java -> featureFiles, stepDefinitions, globalHooks. When I run my entire test suite via Gradle task or JUnit runner, it seems the hooks never gets invokes unless I move them into stepDefintions. Any advice on how this can be fixed? Hooks I'm using are "@BeforeAll, @Before, @After and@AfterAll"