You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
A widget test harness (pumpWidget, tap, find) that runs under dn test #109
I searched the existing feature requests and this is not a duplicate.
Framework or plugin?
Framework
Platform
Not platform-specific
Use case
We can't test any widget code on the host. dn test refuses flutter_test, flutter_driver and integration_test (kUnavailableTestLibraries in packages/flutter_tools/lib/src/dart/pubspec_sdk_entries.dart), and only package:test runs. Under dn test the framework is the stub package, where every body throws UnimplementedError, so no State, build, layout or navigation code can run either, and plugins don't load.
So a screen's behaviour (which widget a state shows, what a tap does, what is pushed) can only be checked by running the app on a simulator and driving it from outside, which is slow (minutes per journey) and can't run in CI without a Mac and a simulator. Today we move as much logic as we can into plain Dart functions tested with package:test, and drive the rest on the simulator. Nothing on dartpub.dev fills this gap, because it needs the framework itself to run on the host.
Proposal
A dartnative_test package, or flutter_test-compatible entry points, that run the real framework on the host with a fake native side: a headless reconciler that records the native mutations and computes layout, plus fake platform bindings so plugins can be stubbed.
The minimum useful set is pumpWidget, pump(duration), pumpAndSettle, tap, enterText, find.text / find.byType / find.byKey, and a way to register a fake for a plugin's binding.
Activity