Open divyapuramshetty opened 1 month ago
Can you specify the tool and version you are using please? This issue is raised under cucumber-js but you mentioned Java, and maybe hinted there is a framework in the mix too?
This issue is stale because it has been open for 3 weeks with no activity. Remove the stale label or comment or this will be closed in another 5 days.
Hi, sorry for the delayed response. We are leveraging cucumber for end to end testing (using webservice call's to validate the responses). Cucumber version 7.18.0, Spring boot 2.5.14 We need to setup test data in the environments before the cucumber tests start running (like table's and lookups that drive the logic and validation). Currently with webhooks and tags ex: @BeforeAll- the test data will run either for every scenario, step or feature. If I have 5 features a global hook will run 5 times. I was trying to find a solution that could just set up the test data for all the features only once and not for every feature. Please let me know if you need more info.
Iām going to move this issue to the correct repository so we can respond better there.
Cucumber has @BeforeAll
and @AfterAll
hooks since v7. You could use those.
https://github.com/cucumber/cucumber-jvm/tree/main/cucumber-java#beforeall--afterall
š¤ What's the problem you're trying to solve?
Is it possible to setup mock data just once before all the features run ?
āØ What's your proposed solution?
May be a global hook that could just run once for all the features and not before every feature file.
ā Have you considered any alternatives or workarounds?
yes, leveraging Java at the moment to do this.
š Any additional context?
No response