This guide describes how to run an iOS test locally so you can quality check the test's behavior before running it in Firebase Test Lab.
Run an XCTest locally
You can verify that Test Lab will be able to install your app and tests by running locally with a USB-connected device as follows:
xcodebuild test-without-building \ -xctestrun "Derived Data/Build/Products/YourApp.xctestrun" \ -destination id=your-phone-id
Run a Game Loop test locally
To run your test locally, load your gaming app in a simulator and run:
xcrun simctl openurl SIMULATOR_UDID firebase-game-loop://
You can find your simulator's UDID by running the
instruments -s devicescommand.
If there is only one simulator running, enter the special string
"booted"in place of SIMULATOR_UDID.
If your test contains multiple loops, you can specify which loop you want to run
by passing the loop number to the
scenario flag. Note that you can
only run one loop at a time when running your test locally. For example, if you
want to run loops 1, 2, and 5, you must run a separate command for each loop:
xcrun simctl openurl SIMULATOR_UDID firebase-game-loop://?scenario=1
xcrun simctl openurl SIMULATOR_UDID firebase-game-loop://?scenario=2
xcrun simctl openurl SIMULATOR_UDID firebase-game-loop://?scenario=5