Flutter 3.38 and Dart 3.10 are here!Learn more
Integration testing concepts
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, useintegration tests.
Integration tests verify the behavior of the complete app. This test can also be called end-to-end testing or GUI testing.
The Flutter SDK includes theintegration_test package.
Terminology
#- host machine
The system on which you develop your app, like a desktop computer.
- target device
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.
Dependent package
# To run integration tests, add theintegration_test package as a dependency for your Flutter app test file.
To migrate existing projects that useflutter_driver, consult theMigrating from flutter_driver guide.
Tests written with theintegration_test package can perform the following tasks.
- Run on the target device. To test multiple Android or iOS devices, use Firebase Test Lab.
- Run from the host machine with
flutter test integration_test. - Use
flutter_testAPIs. This makes integration tests similar to writingwidget tests.
Use cases for integration testing
#The other guides in this section explain how to use integration tests to validatefunctionality andperformance.
Unless stated otherwise, the documentation on this site reflects Flutter 3.38.1. Page last updated on 2025-10-30.View source orreport an issue.