
Testing Flutter apps
4 days ago · The goal of a widget test is to verify that the widget's UI looks and interacts as expected. Testing a widget involves multiple classes and requires a test environment that provides the …
An introduction to unit testing - Flutter
Sep 5, 2025 · The test package provides the core framework for writing unit tests, and the flutter_test package provides additional utilities for testing widgets. This recipe demonstrates the core features …
Testing & debugging - Flutter
Apr 4, 2024 · Testing Flutter apps Learn more about the different types of testing and how to write them.
An introduction to widget testing - Flutter
Sep 22, 2025 · Before writing tests, include the flutter_test dependency in the dev_dependencies section of the pubspec.yaml file. If creating a new Flutter project with the command line tools or a code …
Mock dependencies using Mockito - Flutter
Oct 21, 2025 · To use the mockito package, add it to the pubspec.yaml file along with the flutter_test dependency in the dev_dependencies section. This example also uses the http package, so define …
Check app functionality with an integration test | Flutter
4 days ago · The integration_test package lets you: Use the flutter drive command to run tests on a physical device or emulator. Run on Firebase Test Lab, to automate testing on a variety of devices. …
Find widgets - Flutter
Sep 22, 2025 · The find constant provided by the flutter_test package provides several ways to locate widgets in the test environment. This recipe demonstrated three of these methods, and several more …
Tap, drag, and enter text - Flutter
Sep 22, 2025 · In the test environment, Flutter doesn't automatically rebuild widgets when the state changes. To ensure that the widget tree is rebuilt after simulating a user interaction, call the pump() …
Integration testing concepts - Flutter
4 days ago · To run integration tests, add the integration_test package as a dependency for your Flutter app test file. To migrate existing projects that use flutter_driver, consult the Migrating from …
Testing plugins - Flutter
May 20, 2024 · These tests allow you to test the Dart portion of your plugin just as you would test the Dart code of a non-plugin package. However, the plugin's native code won't be loaded, so any calls …