We run each scenario in its own Spring context, therefore we have unique ClassInitializer(based on Spring ApplicationContext) and unique instance of CustomScreenshot for each scenario. Current Gauge.captureScreenshot() implementation has single ClassInstanceManager instance across all scenarios
Expected behavior
I should be able to take screenshots via Gauge.captureScreenshot() when if I have unique CustomScreenshot per scenario
Actual behavior
Gauge.captureScreenshot() uses wrong CustomScreenshot instances due to incorrect ClassInitializer. Screenshots are taken for wrong scenario
Steps to reproduce
- Set unique ClassInitializer BeforeScenario using
ClassInstanceManager.setClassInitializer()
- Run tests in parallel
- Check screenshots