testing library

Stable widget testing API for composable terminal UIs.

This is a convenience re-export of package:artisanal_widgets/testing.dart so apps depending on package:artisanal can keep using the umbrella package for the supported widget testing surface.

Prefer the direct artisanal_widgets package when widget testing helpers are the only UI surface your app needs. Keep this umbrella entrypoint when the app already depends on the wider Artisanal toolkit.

Classes

Finder
Query helper for locating text in the rendered output.
FlickerAnalysis
Result from scanning terminal output for flicker-prone patterns.
FlickerAnalyzer
Analyzer for synchronized-output gaps, partial clears, and broken frames.
FlickerEvent
One event detected while scanning terminal output.
FlickerStats
Aggregate counts from a flicker scan.
HarnessArtifactEntry
One artifact entry in a harness manifest.
HarnessArtifactManifest
Manifest for a reproducible harness run bundle.
HarnessArtifactValidation
Validation result for one artifact entry.
ManualClock
A manually advanced clock intended for deterministic tests.
TapTarget
A lazy reference to a screen position, resolved at tap time.
WidgetFuzzer
Deterministic random input harness for WidgetTester.
WidgetFuzzOptions
Configuration for a deterministic widget fuzz run.
WidgetFuzzResult
Result of a deterministic widget fuzz run.
WidgetFuzzStep
One generated fuzz action.
WidgetGauntlet
Runs named storm, flicker, and artifact-manifest checks for a widget.
WidgetGauntletConfig
Configuration for WidgetGauntlet.
WidgetGauntletResult
Result from one WidgetGauntlet run.
WidgetStormProfile
A deterministic, named stress profile for WidgetTester.
WidgetStormResult
Result from running a WidgetStormProfile.
WidgetStormRunner
Runner that applies WidgetStormProfile instances to one tester.
WidgetStormStep
One generated storm action.
WidgetTester
A testing harness for TUI widgets that drives events through a real Program instance.
WidgetTestFrame
One deterministic frame snapshot captured by WidgetTester.

Enums

FlickerEventType
Flicker-analysis event families.
FlickerSeverity
Severity for a flicker-analysis event.
HarnessArtifactClass
Artifact classes emitted by widget harness and gauntlet runs.
HarnessArtifactRetention
Retention class for an artifact.
WidgetFuzzAction
Scripted action families generated by WidgetFuzzer.
WidgetStormAction
Action emitted by a WidgetStormProfile.
WidgetStormPattern
Named deterministic storm families.

Extensions

HarnessArtifactClassMetadata on HarnessArtifactClass
Metadata helpers for HarnessArtifactClass.
HarnessArtifactRetentionMetadata on HarnessArtifactRetention
Suggested retention days for HarnessArtifactRetention.
WidgetTesterFlickerAnalysis on WidgetTester
Convenience extension for analyzing captured widget-test terminal output.
WidgetTesterFuzzing on WidgetTester
Convenience extension for running deterministic fuzz input.
WidgetTesterStorming on WidgetTester
Convenience extension for running deterministic storm profiles.

Functions

shouldRedactHarnessField(String fieldName) bool
Returns true when fieldName should be redacted before sharing artifacts.
testWidgets(String description, Future<void> callback(WidgetTester tester), {Object? skip}) Future<void>
Runs callback with a fresh WidgetTester, managing setup/teardown automatically.

Exceptions / Errors

FlickerFailure
Exception wrapper for failed flicker analyses.
WidgetFuzzFailure
Exception thrown by WidgetFuzzResult.throwIfFailed.
WidgetStormFailure
Exception wrapper for failed storm results.