Flutter との統合テスト
コレクションでコンテンツを整理
必要に応じて、コンテンツの保存と分類を行います。
Firebase Test Lab で Flutter アプリをテストするには、Flutter 統合テストを作成し、Android APK または iOS テスト zip ファイルを作成して、通常の Android インストルメンテーション テストまたは iOS XCTest として実行します。
Flutter 統合テストの種類
Flutter は、単体テスト、ウィジェット テスト、統合テストの 3 種類のテストをサポートしています。単体テストでは、メソッドまたはクラスの動作を検証します。ウィジェット テストでは、アプリ自体を実行せずに Flutter ウィジェットの動作を検証します。統合テスト(別名、エンドツーエンド テストまたは GUI テスト)は、アプリ全体を実行します。
統合テストについて詳しくは、Flutter の Integration testing をご覧ください。
Flutter 統合テストを作成する
統合テストの作成方法については、Flutter 統合テスト ドキュメントのプロジェクトの設定 セクションをご覧ください。必要に応じて、Flutter コマンドを使用した実行の手順に従い、テストをローカルで実行し、検証することができます。
Test Lab でのテスト
Test Lab は Android と iOS の両方のターゲットで使用できます。
Android の設定
README の Android Device Testing の手順を行います。
iOS の設定
README の iOS Device Testing の手順を行います。
Robo テストのサポート
Robo テストは Flutter をネイティブでサポートしていません。アプリのクロールを改善するには、Robo スクリプトを使用します。これは、モバイルアプリの手動 QA タスクを自動化し、継続的インテグレーション(CI)とリリース前テスト戦略を可能にするテストです。たとえば、visionText でクリックを使用すると、Robo の動作をより正確かつ堅牢に制御できます。
テスト結果を分析する
Flutter 統合テストは、Android のインストルメンテーション テストまたは iOS の XCTest として実行できます。統合テストの結果を分析するには、プラットフォームに応じて Android 用ドキュメントまたは iOS 用ドキュメントをご覧ください。
制限事項
テストケースごとにテストのタイミングに関する情報を入手することはできません。つまり、テストケースの長さや各テストケースの動画などは、予期した内容と異なることがあります。
トラブルシューティング
問題が発生した場合は、統合テストの公開バグトラッカーを確認してください。
統合テスト フレームワークに起因する新しい問題が発生した場合は、Creating useful bug reports のガイダンスに沿って、公開バグトラッカーで新しい問題を報告してください。
特に記載のない限り、このページのコンテンツはクリエイティブ・コモンズの表示 4.0 ライセンスにより使用許諾されます。コードサンプルは Apache 2.0 ライセンスにより使用許諾されます。詳しくは、Google Developers サイトのポリシーをご覧ください。Java は Oracle および関連会社の登録商標です。
最終更新日 2025-08-16 UTC。
[null,null,["最終更新日 2025-08-16 UTC。"],[],[],null,["\u003cbr /\u003e\n\nTo test Flutter apps with Firebase Test Lab, you can write Flutter\nintegration tests, build Android APKs or iOS test zip files, and run as\nregular Android instrumentation tests or iOS XCTests.\n\nFlutter integration test types\n\nFlutter supports three types of tests: unit tests, widget tests, and\nintegration tests. A *unit test* verifies the behavior of a method or class.\nA *widget test* verifies the behavior of Flutter widgets without running the\napp itself. An *integration test*, also called end-to-end testing or GUI\ntesting, runs the full app.\n\nTo learn more about integration tests, see [Flutter integration testing](https://docs.flutter.dev/testing/integration-tests).\n\nWrite Flutter integration tests\n\nTo learn how to write integration tests, see the [project setup](https://docs.flutter.dev/testing/integration-tests#project-setup)\nsection of the Flutter integration tests documentation. Optionally, you can\nfollow [running using Flutter command](https://docs.flutter.dev/testing/integration-tests#running-using-the-flutter-command)\nto run and verify the tests locally.\n\nTest on Test Lab\n\nYou can use Test Lab with both Android and iOS targets.\n\nAndroid setup\n\nFollow the instructions in the\n[Android Device Testing](https://github.com/flutter/flutter/tree/main/packages/integration_test#android-device-testing)\nsection of the README.\n\niOS setup\n\nFollow the instructions in the\n[iOS Device Testing](https://github.com/flutter/flutter/tree/main/packages/integration_test#ios-device-testing)\nsection of the README.\n\nRobo test support\n\n[Robo tests](/docs/test-lab/android/robo-ux-test) do not natively support\nFlutter. To improve crawling of your app, use [Robo scripts](/docs/test-lab/android/run-robo-scripts),\nwhich are tests that automate manual QA tasks for mobile apps, and enable\ncontinuous integration (CI) and pre-launch testing strategies.\nFor example, to control Robo behavior in a more precise and robust way, you can\nuse clicks with [visionText](/docs/test-lab/android/robo-scripts-reference#click).\n\nAnalyze test results\n\nYou can run Flutter integration tests as an Android instrumentation test or an\niOS XCTest. To analyze the result of an integration test, see the\ndocumentation for [Android](https://firebase.google.com/docs/test-lab/android/analyzing-results)\nand [iOS](https://firebase.google.com/docs/test-lab/ios/analyzing-results),\ndepending on your platform.\n\nLimitations\n\nTest timing information for individual test cases is not available, which means\nthat features like test case duration and videos for individual test cases\ndon't work as expected.\n\nTroubleshooting\n\nIf you encounter issues, check the [public issue tracker for integration tests](https://github.com/flutter/flutter/issues?q=is%3Aopen+is%3Aissue+label%3A%22f%3A+integration_test%22).\n\nIf you encounter a new issue caused by the integration test framework,\nfile a new issue in the public issue tracker following the guidance in\n[Creating useful bug reports](https://docs.flutter.dev/resources/bug-reports)."]]