iOS Device Testing

Step changelog

Run iOS XCUItests on devices

Description

Run iOS XCUItests on physical devices with Google's Firebase Test Lab. You do not have to set up and register your own devices and you don't need your own Firebase account.

We'll go over the most important configuration information for the Step. For more information, check out our detailed guide.

Configuring the Step

To use the Step, you need to build an IPA file with Xcode's build-for-testing action. You can use our dedicated Step:

  1. Add the Xcode Build for testing for iOS Step to your Workflow.

    The Step exports a .zip file that contains your test directory (by default, it’s Debug-iphoneos) and the xctestrun file.

  2. Add the iOS Device Testing Step to the Workflow.

  3. In the Test devices input field, specify the devices on which you want to test the app.

  4. Optionally, you can set a test timeout and configure file download in the Debug input group. The path to the downloaded files will be exported as an Environment Variable and it can be used by subsequent Steps.

  5. Make sure you have the Deploy to Bitrise.io Step in your Workflow, with version 1.4.1 or newer. With the older versions of the Step, you won’t be able to check your results on the Test Reports page!

Please note you should not change the value of the API token and the Test API's base URL input.

Troubleshooting

If you get the Build already exists error, it is because you have more than one instance of the Step in your Workflow. This doesn't work as Bitrise sends the build slug to Firebase and having the Step more than once in the same Workflow results in sending the same build slug multiple times.

Useful links

Device testing for iOS

Related Steps

Xcode Build for testing for iOS Xcode Test for iOS

🧩 Get started

Add this step directly to your workflow in the Bitrise Workflow Editor.

You can also run this step directly with Bitrise CLI.

βš™οΈ Configuration

Inputs
Key Description Flags Default
zip_path Open finder, and navigate to the directory you designated for Derived Data output. Open the folder for your project, then the Build/Products folders inside it. You should see a folder Debug-iphoneos and PROJECT_NAME_iphoneos_DEVELOPMENT_TARGET-arm64.xctestrun. Select them both, then right-click on one of them and select Compress 2 items. required $BITRISE_TEST_BUNDLE_ZIP_PATH
test_devices Format: One device configuration per line and the parameters are separated with , in the order of: deviceID,version,language,orientation For example: iphone8,14.7,en,portrait iphone8,14.7,en,landscape Available devices and its versions: β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚ MODEL_ID β”‚ NAME β”‚ OS_VERSION_IDS β”‚ TAGS β”‚ β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€ β”‚ ipad5 β”‚ iPad (5th generation) β”‚ 15.4 β”‚ β”‚ β”‚ ipadmini4 β”‚ iPad mini 4 β”‚ 15.4 β”‚ β”‚ β”‚ iphone11 β”‚ iPhone 11 β”‚ 13.3,13.6 β”‚ β”‚ β”‚ iphone11pro β”‚ iPhone 11 Pro β”‚ 13.3,14.7 β”‚ β”‚ β”‚ iphone13pro β”‚ iPhone 13 Pro β”‚ 15.2 β”‚ β”‚ β”‚ iphone8 β”‚ iPhone 8 β”‚ 12.4,13.6,14.7 β”‚ deprecated=12.4, default β”‚ β”‚ iphone8plus β”‚ iPhone 8 Plus β”‚ 12.0 β”‚ deprecated=12.0 β”‚ β”‚ iphonexr β”‚ iPhone XR β”‚ 12.4,13.2 β”‚ deprecated=12.4 β”‚ β”‚ iphonexsmax β”‚ iPhone XS Max β”‚ 12.1 β”‚ deprecated=12.1 β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ required iphone8,14.7,en,portrait
test_timeout Max time a test execution is allowed to run before it is automatically canceled. The default value is 900 (15 min). Duration in seconds with up to nine fractional digits. Example: "3.5". 900
download_test_results If this input is set to true all files generated in the test run will be downloaded. Otherwise, no any file will be downloaded. required false
api_base_url The URL where test API is accessible. required https://vdt.bitrise.io/test
api_token The token required to authenticate with the API. required, sensitive $ADDON_VDTESTING_API_TOKEN
Outputs
Environment Variable Description
VDTESTING_DOWNLOADED_FILES_DIR The directory containing the downloaded files if you have set download_test_results inputs above.

πŸ™‹ Contributing

We welcome pull requests and issues against this repository.

For pull requests, work on your changes in a forked repository and use the Bitrise CLI to run step tests locally.

Learn more about developing steps: