Forum Discussion

automation_user's avatar
automation_user
New Member
3 years ago

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"

No RepliesBe the first to reply