
An introduction to widget testing - Flutter
Sep 22, 2025 · In the introduction to unit testing recipe, you learned how to test Dart classes using the test package. To test widget classes, you need a few additional tools provided by the flutter_test …
Testing Flutter apps
Jan 21, 2026 · Testing a widget involves multiple classes and requires a test environment that provides the appropriate widget lifecycle context. For example, the Widget being tested should be able to …
Widget testing - Flutter
Oct 28, 2025 · A catalog of recipes for adding widget testing to your Flutter app.
Tap, drag, and enter text - Flutter
Oct 30, 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() …
An introduction to unit testing - Flutter
Oct 30, 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 …
Find widgets - Flutter
Sep 22, 2025 · To locate widgets in a test environment, use the Finder classes. While it's possible to write your own Finder classes, it's generally more convenient to locate widgets using the tools …
Common Flutter errors
Oct 30, 2025 · This page explains several frequently-encountered Flutter framework errors (including layout errors) and gives suggestions on how to resolve them. This is a living document with more …
Handle scrolling - Flutter
Oct 30, 2025 · How to handle scrolling in a widget test.
Check app functionality with an integration test - Flutter
Mar 7, 2026 · 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. …
Testing each layer - Flutter
Oct 30, 2025 · Testing the data layer Similar to the UI layer, the components of the data layer have well-defined inputs and outputs, making both sides fake-able. To write unit tests for any given repository, …