CheckOps
Flutter integration_test
integration_test is Flutter's official package for end-to-end tests that run a full app on physical devices, emulators or Firebase Test Lab, using flutter_test-style APIs and the flutter drive or flutter test commands.
Latest public signals
Not refreshed yet. Refresh reads the public site and, when the entry has a GitHub repository, the latest release.
Introduction
Flutter’s integration_test package is the official way to test a complete Flutter app, or a large part of it, running on a real device or emulator. The Flutter documentation explains that it lets you use the flutter drive command to run tests on a physical device or emulator, run on Firebase Test Lab to automate testing across many devices, and write tests with flutter_test APIs in a style similar to widget tests.
The guide walks through the counter app: add integration_test and flutter_test as dev dependencies from the SDK (flutter pub add "dev:integration_test:{sdk: flutter}"), create an integration_test/ directory, call IntegrationTestWidgetsFlutterBinding.ensureInitialized(), then use testWidgets, WidgetTester, finders and matchers exactly as in widget tests, but against the real app with real platform channels and plugins. Tests run with flutter test integration_test on a connected device or with flutter drive for web and profiling scenarios. Because the package runs inside the Flutter engine, it cannot tap native OS dialogs or notifications; LeanCode’s Patrol extends it for those cases. The package ships with the Flutter SDK under the BSD-3-Clause licence.
Features
- Official Flutter E2E: Ships with the SDK.
- Real devices and emulators: Runs the full app with plugins.
- Familiar API: Same WidgetTester and finders as widget tests.
- Firebase Test Lab support: Scale across device matrices.
Pros
- Free: Included with Flutter.
- Official: Maintained by the Flutter team.
Cons
- No native UI access: Cannot handle permission dialogs or notifications without Patrol.
- Slower than widget tests: Requires building and launching the app.
Usage and Links (Example)
flutter pub add "dev:integration_test:{sdk: flutter}"
// integration_test/app_test.dart
import 'package:flutter/material.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:integration_test/integration_test.dart';
import 'package:counter_app/main.dart' as app;
void main() {
IntegrationTestWidgetsFlutterBinding.ensureInitialized();
testWidgets('tap increments counter', (tester) async {
app.main();
await tester.pumpAndSettle();
await tester.tap(find.byKey(const ValueKey('increment')));
await tester.pumpAndSettle();
expect(find.text('1'), findsOneWidget);
});
}
flutter test integration_test/app_test.dart
Resources:
Pricing
Free and open source as part of the Flutter SDK (BSD-3-Clause licence).
Recommended for?
- Flutter teams writing end-to-end tests in Dart.
- Teams running device matrices on Firebase Test Lab.
Conclusion
integration_test is the official foundation for Flutter end-to-end tests; add Patrol when tests must interact with native UI.
Alternatives
Other tools on CheckOps that cover similar ground. Open a page, or compare one with Flutter integration_test side by side.
PPatrolPatrol is LeanCode's Apache-2.0, Flutter-first E2E UI testing framework that extends integration_test with native automation (permissions, notifications, WebViews, device settings), custom finders, test isolation and sharding.Compare with Flutter integration_test
FFlutter Test (flutter_test)flutter_test is Flutter's official testing package and flutter test command for unit and widget tests, with WidgetTester, finders, matchers, golden-file tests and coverage.Compare with Flutter integration_test
AAppiumCross-platform automation framework for all kinds of apps, built on top of the W3C WebDriver protocol.Compare with Flutter integration_test
MMaestroMaestro is a YAML UI test runner for Android, iOS, and web. The CLI is free and open source; Maestro Cloud is paid.Compare with Flutter integration_test
FFirebase Test LabFirebase Test Lab runs Android and iOS tests on Google-hosted devices. It is deprecated and scheduled to shut down on 30 September 2027.Compare with Flutter integration_test- DDetoxGray box end-to-end testing and automation framework for mobile apps.Compare with Flutter integration_test