CheckOps home

Tools directory

F

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.

Visit website

Latest public signals

Not refreshed yet. Refresh reads the public site and, when the entry has a GitHub repository, the latest release.

Visit Website

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

  1. Official Flutter E2E: Ships with the SDK.
  2. Real devices and emulators: Runs the full app with plugins.
  3. Familiar API: Same WidgetTester and finders as widget tests.
  4. Firebase Test Lab support: Scale across device matrices.

Pros

  1. Free: Included with Flutter.
  2. Official: Maintained by the Flutter team.

Cons

  1. No native UI access: Cannot handle permission dialogs or notifications without Patrol.
  2. Slower than widget tests: Requires building and launching the app.
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).

  1. Flutter teams writing end-to-end tests in Dart.
  2. 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.