Get started with Firebase Test Lab from the Firebase Console

Firebase Test Lab lets you test your iOS app on multiple devices, right from the Firebase console. Keep reading to find out how to get started.

Create a Firebase project

If you don't have a Firebase project for your app, go to the Firebase console and click Create New Project to create one now. You will need ownership or edit permissions in your project.

You can use Test Lab for a limited number of daily test executions on the Spark and Flame plans. To use Test Lab without daily quota limits, you must upgrade to the Firebase Blaze plan.

Build XCTests for your app

There are three things you need to do to build iOS tests in a Test Lab-compatible format:

Configure your project's Derived Data location

Xcode places compiled iOS artifacts, including any tests you build, in a Derived Data directory. It is possible to keep the default location for that directory, if you'd like, but it's often helpful to choose a more easily-accessible place for the files, especially if you're going to be running tests with Test Lab often:

  1. Open your project in Xcode.
  2. In the macOS menu bar, select File > Project Settings...
  3. Change the Derived Data dropdown from Default Location to Custom Location.
  4. In the field below the dropdown, select a location for Xcode to output your tests to.

Build generic test files

Test Lab runs unit tests and UI tests using the XCTest framework. To run your app's XCTests on Test Lab devices, build it for testing on a Generic iOS Device:

  1. From the device dropdown at the top of your Xcode workspace window, select Generic iOS Device.
  2. In the macOS menu bar, select Product > Build For > Testing.

Compress the test files for upload

Finally, package your test for upload to Test Lab by compressing the test files you built into a .zip file:

  1. Open finder, and navigate to the directory you designated for Derived Data output.
  2. Open the folder for your project, then the Build/Products folders inside it.
  3. You should see a folder Debug-iphoneos and PROJECT_NAME_iphoneosDEVELOPMENT_TARGET-arm64.xctestrun. Select them both, then right-click on one of them and select Compress 2 items.

Run your tests

Once you have an XCTest .zip file, you're ready to start testing:

  1. Open Test Lab in the Firebase console.
  2. If it's your first test, click Get Started under iOS. If it isn't, click Run a Test, and select Run an XCTest.
  3. Click Browse, and find the .zip file you created.
  4. Check the box for each device and version you'd like to test on.
  5. Click Start Tests.

Investigate your test results

When the test starts, you're automatically redirected to the test results page. Tests can take a number of minutes to run, depending on the number of different configurations you have selected and the test timeout duration set for your tests. After your tests have run, you can review test results. See Analyzing Firebase Test Lab Results to learn more about how to interpret the test results.

Send feedback about...

Need help? Visit our support page.