Skip to content

Gauge.captureScreenshot() ignores user specified ClassInstanceManager #510

@ZhyliaievD

Description

@ZhyliaievD

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

  1. Set unique ClassInitializer BeforeScenario using ClassInstanceManager.setClassInitializer()
  2. Run tests in parallel
  3. Check screenshots

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions