AttemptExecutionBoundary class final

Owns the common execution boundary for one test attempt.

The application adapters still decide what to launch and how to report a failure. This boundary owns the part that must be identical in both adapters: install attempt-local runtime hooks, execute inside the captured console zone, run adapter cleanup while those hooks are still active, and restore the previous isolate state. A body failure always remains primary when cleanup also fails. Each instance represents exactly one attempt and is single-use; attempts must get distinct boundaries to isolate hooks.

Constructors

AttemptExecutionBoundary({required EnsembleTestContext context, required WidgetTester tester, void Function() captureDebugPrint()?})

Properties

hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

addCleanup(Future<void> callback()) → void
Register resources owned by this attempt.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
run<T>({required Future<T> body(), Future<void> beforeClose(Object? bodyError, StackTrace? bodyStackTrace)?}) → Future<T>
runCaptured<T>({required Future<T> body(), Future<void> beforeClose(Object? bodyError, StackTrace? bodyStackTrace)?}) → Future<AttemptExecutionOutcome<T>>
Runs an attempt while preserving its body and close failures as data.
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited