| [ Web Proxy ] |
| Viewing: https://docs.flutter.dev/cookbook/testing/integration/introduction | [Back] [Original] |
docs.flutter.dev uses cookies from Google to deliver and enhance the quality of its services and to analyze traffic.
Learn about integration testing in Flutter.
Unit tests and widget tests validate individual classes, functions, or widgets. They don't validate how individual pieces work together in whole or capture the performance of an app running on a real device. To perform these tasks, use integration tests.
Integration tests verify the behavior of the complete app. This test can also be called end-to-end testing or GUI testing.
Two packages are commonly used to perform Flutter integration tests. These are:
integration_test
package: The official
integration test package that is part of the Flutter SDK. Tests written
with integration_test can perform the following tasks: run on the
target device, run from the host machine with flutter test integration_test,
and use flutter_test APIs. This makes integration tests similar to writing
widget tests. However, integration_test
can't interact with
native platform UI.
patrol package: A popular third-party integration test package that
has many of the features supported by the integration_test package,
but can additionally interact with native platform UI such as
permission dialogs, notifications, or the contents of platform views.
The system on which you develop your app, like a desktop computer.
The mobile device, browser, or desktop application that runs your Flutter app.
If you run your app in a web browser or as a desktop application, the host machine and the target device are the same.
To use integration_test, add it as a dependency for your
Flutter app test file.
To migrate existing projects that use flutter_driver,
consult the Migrating from flutter_driver
guide.
To use patrol, follow the Patrol setup guide.
The other guides in this section explain how to use integration tests to validate functionality and performance.
Unless stated otherwise, the documentation on this site reflects Flutter 3.44.7. Page last updated on 2026-05-05. View source or report an issue.
| Web Proxy Viewer | New URL | Original Page |