To test Flutter apps with Firebase Test Lab, you can write Flutter integration tests, build Android APKs or iOS test zip files, and run as regular Android instrumentation tests or iOS XCTests.
Flutter integration test types
Flutter supports three types of tests: unit tests, widget tests, and integration tests. A unit test verifies the behavior of a method or class. A widget test verifies the behavior of Flutter widgets without running the app itself. An integration test, also called end-to-end testing or GUI testing, runs the full app.
To learn more about integration tests, see Flutter integration testing.
Write Flutter integration tests
To learn how to write integration tests, see the project setup section of the Flutter integration tests documentation. Optionally, you can follow running using Flutter command to run and verify the tests locally.
Test on Test Lab
You can use Test Lab with both Android and iOS targets.
Android setup
Follow the instructions in the Android Device Testing section of the README.
iOS setup
Follow the instructions in the iOS Device Testing section of the README.
Robo test support
Robo tests do not natively support Flutter. To improve crawling of your app, use Robo scripts, which are tests that automate manual QA tasks for mobile apps, and enable continuous integration (CI) and pre-launch testing strategies. For example, to control Robo behavior in a more precise and robust way, you can use clicks with visionText.
Analyze test results
You can run Flutter integration tests as an Android instrumentation test or an iOS XCTest. To analyze the result of an integration test, see the documentation for Android and iOS, depending on your platform.
Limitations
Test timing information for individual test cases is not available, which means that features like test case duration and videos for individual test cases don't work as expected.
Troubleshooting
If you encounter issues, check the public issue tracker for integration tests.
If you encounter a new issue caused by the integration test framework, file a new issue in the public issue tracker following the guidance in Creating useful bug reports.