Greetings,
I'm trying to perform some initialization before tests are run. I've reviewed a few documented methods and they appear to be inadequate (except in one case) because the app is launched before the method is executed: Custom Scripts, Execution Extension, and Cleanup.
The Execution Extension comes the closest, and in fact the OnBeforeTestListStarted method does work, but it only works when running a test list. During running individual tests during test development, this is not used as tests are run individually.
The problem with running cleanup in OnAfterTestCompleted seems to be that this method is not called when a test is aborted, and an invalid environment is left to manually cleanup on the next test run.
How can I hook into test execution before the system under test app is launched to perform initialization / cleanup?