Features

XCUITest Intro

TestingBot provides a grid of physical iOS devices in the cloud, ready to run your XCUITests.
XCUITest (a framework within the larger XCTest Testing framework) is Apple's automation framework, which comes with Apple's XCode IDE, capable of running automated UI tests on iPhone and iPad devices.

Setup

XCUITest is packaged in a zip file. You will need two files to perform XCUITesting on our cloud:

  • An .ipa file of the actual mobile application that you want to test.
  • Another .zip file of the XCUITests.

If you just want to give this a try, we have a TestingBot XCUITest Demo App which you can use with the following steps.

Upload iOS App

You can upload your .ipa file to TestingBot storage with our REST-API.
Please see the example below on how to do this with cURL:

curl -u api_key:api_secret \
-X POST "https://api.testingbot.com/v1/app-automate/xcuitest/app" \
-F "file=@/path/to/app/file/sample-debug.ipa"

The API response will include an id response, which you can use in the other API calls.

{
    "id": 4012
}

Upload XCUITest Suite

If you do not have a .zip file yet, please see our Build Testsuite documentation.

To upload the XCUITest suite, in .zip file, please use our REST-API.

curl -u api_key:api_secret \
-X POST "https://api.testingbot.com/v1/app-automate/xcuitest/:id/tests" \
-F "file=@/path/to/app/file/application-debug-test.zip"

Replace the :id with the identifier you received during the app upload call. (In this example 4012)

Run XCUI tests

Once you've uploaded both your app and test suite, you can start a XCUITest on the TestingBot cloud.

Specify one or more capabilities, to indicate on which iOS devices you want to run your tests on.

Select a Device Name

Replace the :id with the identifier you received during the app upload call. (In this example 4012)

We offer special parameters which you can use to allocate a device:

Regex Input Result
"iPhone.*" This will allocate any available iPhone device (phone)
"*" This will allocate a random available device
"iPhone [8-11]" This will allocate either an iPhone 8 or 11
"iPhone 6.*" This will allocate either an iPhone 6 or 6S

Some Examples:

// find any iPhone, except 6 or 6s
-d '{"capabilities":[{"deviceName":"^(iPhone.*)(?!6|6S)$", "platformName":"iOS", "realDevice": true}]}'

// find any device which name starts with iPad
-d '{"capabilities":[{"deviceName":"iPad.*", "platformName":"iOS", "realDevice": true}]}'

Tablet Only

You can specify the tabletOnly capability when you only want to allocate a tablet device.

Phone Only

You can specify the phoneOnly capability when you only want to allocate a phone device.


-d '{"capabilities":[{"deviceName":"*", "tabletOnly": true, "platformName":"iOS", "realDevice": true}]}'

-d '{"capabilities":[{"deviceName":"*", "phoneOnly": true, "platformName":"iOS", "realDevice": true}]}'

View XCUITest Results

The XCUITest results will be available in the TestingBot dashboard.

Each test result contains a video, test logs and other meta data generated during the test run.