gauge-java
gauge-java copied to clipboard
Gauge.captureScreenshot() ignores user specified ClassInstanceManager
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
+1
@ZhyliaievD Could you please provide a very basic sample project which I can use to replicate this issue? I'm afraid I do not have good knowledge about spring, so it would a bit difficult and time-consuming to replicate this.
Also, I see that you raised aPR for the very same issue and then closed it, were you able to fix the issue in the PR?