Firebase Test Lab lets you quality test your app on a range of devices and configurations. This guide provides an overview of Test Lab's key concepts, iOS offerings, and instructions on how to start testing.
For information about Test Lab quotas and billing plans, see Usage, Quotas, and Pricing.
Key concepts and terms
When you run a test or a set of test cases against devices and configurations you've selected, Test Lab runs the test against your app in a batch, then displays the results as a test matrix.
Devices × Test Executions = Test Matrix
- A physical or virtual device (Android only) you run a test on, such as a phone, tablet, or wearable device. Devices in a test matrix are identified by device model, OS version, screen orientation, and locale (also known as geography and language settings).
- Test, test execution
- A test (or a set of test cases) to be run on a device. You can run one test per device, or optionally shard the test and run its test cases on different devices.
- Test matrix
- Contains the statuses and test results for your test executions. If any test execution in a matrix fails, the whole matrix fails.
Step 1: Prepare your test for uploading to Test Lab
You can run the following tests with Test Lab. Note that all test types can run up to a maximum of 45 minutes on physical devices, and any uncaught exception will cause a test failure.
Game Loop test: A test that uses a "demo mode" to simulate player actions in gaming apps. This is a fast and scalable way to verify that your game performs well for users. When you choose to run a Game Loop test, you can:
Write tests native to your game engine.
Avoid writing the same code for different UIs or testing frameworks.
Optionally create multiple loops to run in a single test execution. You can also organize loops by using labels so you can keep track of them and re-run specific loops.
Visit Run a Game Loop test for instructions on how to run your test in Test Lab.
Step 2: Choose a tool to run your test
You can choose the following tools to run your test with:
The Firebase console lets you upload an app and initiate testing from anywhere. See Test with the Firebase console for instructions on using this tool.
The gcloud command line interface (CLI) enables you to run tests from the command line interactively, and is also well suited for scripting as part of your automated build and testing process. See Test with the gcloud CLI for instructions on using this tool.
Before testing on real devices, run your test locally on a simulator to make sure it behaves as intended. See Test locally for instructions.
Step 3: Specify testing devices
With Test Lab, you can run your test against your app on a wide range of iOS devices and models hosted in a Google data center. To learn more, see Available devices.
Step 4: Review test results
Regardless of how you initiate your tests, all your test results are managed by Test Lab and can be viewed online.
The test result summary is automatically stored and can be viewed in the Firebase console. It contains the most relevant data for your test, including test case-specific videos, screenshots, the number of tests that passed, failed, or got flaky results, and more.
The raw test results contain test logs and app failure details, and is automatically stored in a Google Cloud bucket. If you specify a bucket, you are responsible for the cost of the storage. If you don't specify a bucket, Test Lab creates one for you for free.
For more details, see Analyze Firebase Test Lab Results.
Google takes the security of your app data very seriously. We follow industry-standard best practices to remove app data and reset system settings for physical devices after every test run to ensure that they are ready to run new tests. For devices that we can flash with a custom recovery image, we go one step further by flashing these devices between test runs.
For the virtual devices used by Test Lab, device instances are deleted after they are used so that each test run uses a new virtual device instance.
Test Lab and mobile advertising
For app developers that use or work with digital advertising providers (for example, ad networks, demand-side platforms) and for digital advertising providers:
Test Lab provides developers with a scalable app testing infrastructure that automates app testing. Unfortunately, this capability could be misused by malicious apps designed to generate fraudulent ad revenue.
To mitigate this issue:
App developers should notify any digital advertising providers they work with to filter out revenues and all corresponding traffic generated from devices that belong to testing providers, including Test Lab.
Digital advertising providers can filter ad revenues and all corresponding traffic generated from Test Lab by filtering traffic originating from the following IP address blocks (note that you can also access this list by using the
gcloud beta firebase test ip-blocks listcommand in the gcloud CLI):
|Platform and device type||CIDR IP address block|
|Android and iOS physical devices||
220.127.116.11/28 (added 03-2020)
18.104.22.168/29 (added 04-2020)
22.214.171.124/28 (added 04-2020)
126.96.36.199/29 (added 04-2020)
|Android virtual devices||
188.8.131.52/29 (added 11-2019)
184.108.40.206/29 (added 11-2019)
220.127.116.11/29 (added 11-2019)
18.104.22.168/29 (added 11-2019)
22.214.171.124/27 (added 7-2019)