executeAttemptSetup method

Future<void> executeAttemptSetup(
  1. EnsembleTestCase test, {
  2. Future<void> beforeSteps()?,
  3. Future<void> afterSteps()?,
})

Runs the shared setup stage with adapter-owned work around its edges.

The standalone runner restores a saved session before setup steps, while an application-owned runner applies in-place setup after them. Keeping those hooks around the same executor makes the setup ordering explicit without folding either launch policy into this mode-neutral stage.

Implementation

Future<void> executeAttemptSetup(
  EnsembleTestCase test, {
  Future<void> Function()? beforeSteps,
  Future<void> Function()? afterSteps,
}) async {
  await beforeSteps?.call();
  await execute(test);
  await afterSteps?.call();
}