Skip to content

one time setup for reflective test type #2163

@RohitSaily

Description

@RohitSaily

i currently do not see a way to perform a one-time setup that is done once for a test type before its unit tests are run. i tried

@reflectiveTest final class Example
{ Example()
  { //one time set up here, run once before any "test_..." methods are run
  }
}

looking at the package code, the class is reinstantiated for every unit test so the one time set up occurs every time. i was thinking of trying to change it so the same instance is reused for every unit test done from that type, therefore allowing one time setup via the constructor

any thoughts before i make a PR?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions