
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 …
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() …
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.
Handle scrolling - Flutter
Oct 30, 2025 · How to handle scrolling in a widget test. Now, you can write a test. In this example, scroll through the list of items and verify that a particular item exists in the list. The WidgetTester class …
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 …
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. …
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 …
Test orientation - Flutter
Nov 24, 2025 · This test makes sure that the orientation is landscape and that only 3 columns of data appear in the app: In test/widget_test.dart, inside of the Orientation group, add the following test after …
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, …