Test A Flutter App

Use many cheap tests and a few target-realistic tests.

Test Mix

Test typeUse forCommand
UnitModels, repositories, view models, parsing, policy logicflutter test test/...
WidgetRendering, interactions, accessibility guidelinesflutter test test/...
IntegrationFull app flows on device, emulator, desktop, or browserflutter test integration_test or flutter drive path
Native interactionPermission dialogs, notifications, platform viewsPatrol or platform-specific test path
Manual smokeStore builds, screen readers, real devicesRecorded checklist

Layered Example

test/features/notes/notes_view_model_test.dart
test/features/notes/notes_view_test.dart
integration_test/app_smoke_test.dart

Keep plugin access behind fakes so unit and widget tests do not need native runtime setup.

What integration_test Does Not Prove

The official docs call out native UI gaps. If a flow depends on OS permission dialogs, notifications, or platform views, add a native-aware route such as Patrol or manual device smoke.

Gotcha: A widget test can prove your Flutter UI reacts correctly. It cannot prove Android permission policy, iOS capabilities, or desktop packaging.