Interface for one isolated app test execution (observe / act / wait / assert).
Ownership
- Suite-attached: EnsembleTestRunner owns harness bootstrap and suite cleanup. close releases only session-local state (command queue, revisions, observation registry) — never the harness, tester, mocks, or suite-end storage restore.
- Standalone: Independent of the input document format, still inside a Flutter test binding. A factory reuses EnsembleTestHarness bootstrap; callers never touch WidgetTester directly.
Revisions
UiObservation.revision advances when observable UI state changes (text, enabled, visibility, bounds, values, actions, navigation). Completing an action does not by itself bump the revision.
Leaf locking
Only leaf operations (observe, act, waitFor, assertCondition,
captureArtifact) acquire the session command lock. Declarative control-flow
(group / repeat / optional / ifVisible) must not hold it.
Every execution request uses TestOperation. The registry validates its name and operation kind at the session boundary; operation-specific input remains in the immutable request map.
Element identity
Snapshot UiElement.elementId values resolve only through the observation
registry and are revalidated before execution. They never fall back to
testId.
Capabilities vs permissions
getCapabilities reports what the adapter can provide. SessionPermissions (configured at creation) reports what the caller may invoke. Both must allow an operation.
- Implementers
Properties
Methods
-
act(
TestOperation operation) → Future< ActionResult> -
assertCondition(
TestOperation operation) → Future< AssertionResult> -
captureArtifact(
ArtifactRequest request) → Future< TestArtifact> -
close(
) → Future< void> - Releases session-local resources. Idempotent.
-
getCapabilities(
) → Future< SessionCapabilities> -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
observe(
{ObservationOptions options = const ObservationOptions()}) → Future< UiObservation> -
toString(
) → String -
A string representation of this object.
inherited
-
waitFor(
TestOperation operation, {Duration? timeout}) → Future< WaitResult>
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited