Forum Discussion
sandyy77
22 days agoNew Member
Solid feature request. Current Cucumber/Karate hooks fire per scenario, which defeats the purpose when test data setup is heavy. In the meantime, a workaround: use a static flag in a singleton helper class.
@Before("@game") public void setup() { if (!GameDataSetup.initialized) { GameDataSetup.init(); GameDataSetup.initialized = true; } }
Reset the flag in an @AfterAll. Not as clean as native @BeforeGroup but works today. Same trick I use for batch testing geometry dash endpoints.