TestRuntimeState class

Mutable runtime flags and logs for declarative test steps.

Constructors

TestRuntimeState()

Properties

appFrameTimings → List<AppFrameTimingEntry>
final
attemptCount ↔ int
getter/setter pair
attemptNumber ↔ int
One-based attempt number and configured attempt count for the current case. Used to keep retry diagnostics in distinct report sidecars.
getter/setter pair
consoleCaptureZone → ZoneSpecification
Zone interceptor that records print (and therefore debugPrint) once.
no setter
consoleLogs → List<String>
final
currentStepIndex ↔ int?
Active top-level step index while _executeSteps runs (0-based). Used to attribute API calls and console lines to Step Details.
getter/setter pair
debugArtifactsWrite ↔ Future<void>?
The final diagnostic sidecars are written once per attempt. Keeping the in-flight operation here lets success and failure cleanup converge on a single write when both paths observe the same attempt outcome.
getter/setter pair
debugLogArtifactsWrite ↔ Future<void>?
In-flight API and application-console sidecar publication for this attempt. The kernel terminal subscriber and outer cleanup share it.
getter/setter pair
deviceSize ↔ Size?
getter/setter pair
flutterErrors → List<String>
final
hashCode → int
The hash code for this object.
no setterinherited
keychainStepDiffs → List<StorageStepDiff>
final
locale ↔ Locale?
getter/setter pair
networkOffline ↔ bool
getter/setter pair
performanceMarkers → List<PerformanceMarker>
final
permissions → Map<String, String>
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
screenArtifacts → Map<String, Map<String, dynamic>>
Map from screen name to performance artifacts.
final
screenshotSheetFrames → List<ScreenshotSheetFrame>
final
secureStorageStepDiffs → List<StorageStepDiff>
final
stepObservers → List<StepObserverArtifact>
Live UI dumps for Step Details → Observer (one per step that was shot).
final
storageStepDiffs → List<StorageStepDiff>
Public-storage diffs captured at the end of each top-level step.
final
themeMode ↔ String?
getter/setter pair

Methods

addFrameTimings(List<FrameTiming> timings) → void
addScreenshotSheetFrame(ScreenshotSheetFrame frame) → void
artifactFilePrefix(String testId) → String
captureDebugPrint() → VoidCallback
Captures debugPrint calls even when Flutter runs their callbacks in a zone outside consoleCaptureZone, as WidgetTester.runAsync does.
clear() → void
formatConsoleLine(String message) → String
Console prefix with ISO timestamp and optional [step=N] tag.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
recordPerformanceMarker(PerformanceMarker marker) → void
runAsyncWithConsoleCapture<T>(WidgetTester tester, Future<T> callback()) → Future<T?>
Runs asynchronous app work in a capture zone even when the test binding moves execution out of the calling zone.
takeScreenshotArtifacts() → ({List<ScreenshotSheetFrame> frames, List<StepObserverArtifact> stepObservers})
Detaches the visual report buffers for completion without disposing them. Hosted and standalone adapters share this transfer so they cannot drift on copy/clear behavior before handing frames to the report writer.
toString() → String
A string representation of this object.
inherited
upsertStepObserver(StepObserverArtifact artifact) → void
Replace any existing observer for artifact.stepIndex.

Operators

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