TestHarnessHostRuntime class

Owns host setup for widget and integration execution environments.

This boundary keeps platform channels, optional integrations, and host metadata out of the execution harness orchestration.

Constructors

TestHarnessHostRuntime()

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

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

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

Static Properties

testStoragePathCreatedForTest → bool
Exposes initialization state for the startup-boundary regression test.
no setter

Static Methods

afterTestPluginBootstrap() → void
Runs selected integration hooks that require the app to be bootstrapped.
configureTestIntegrations(Iterable<TestIntegrationRegistration> registrations) → void
Selects the optional integrations for the next test execution path.
deviceInfoMockForTest() → Map<String, Object?>
Platform-shaped device_info_plus map. A macOS payload on iOS makes IosDeviceInfo.fromMap throw type 'Null' is not a subtype of type 'String' because required fields such as name are missing.
disposeTestStorage() → void
Removes the process-owned backing directory used by mocked path provider calls. It is recreated lazily for the next test process.
ensureIntegrationRuntime() → void
Initializes only runner-owned Dart listeners for a real application. Native plugin channels remain registered by the Android/iOS host app.
ensureTestPlugins() → void
Widget tests mock MethodChannels because there is no host OS plugin. Integration runs inside a real Android/iOS binary; those plugins must stay registered. Host drivers call this in both modes.
pruneStaleTestStorageDirectories({Directory? temporaryRoot, DateTime? now, Duration staleAfter = const Duration(days: 1)}) → void
Removes runner-owned temporary directories left by a process terminated before suite teardown. Normal runs remove their own storage and artifact transport directories; the age threshold protects active concurrent runs.
runWithRealNetworkHttpOverrides<T>(Future<T> run()) → Future<T>
Runs the app under a real HTTP client while keeping the override scoped to the suite's async zone. A global or painting-debug override leaks across Flutter widget tests and fails Flutter's test invariants.