Starting a build
Start an XCUITest build on one or more real iPhones and iPads, and choose which tests run.
One request runs your app and test suite on a list of devices:
curl -u "x:$TESTKASE_ACCESS_KEY" -H "Content-Type: application/json" \
https://hub.testkase.com/xcuitest/v1/build \
-d '{
"app": "farm://app-3f9c01a2b4c5d6e7",
"testSuite": "farm://suite-81ad02c4e9f1b367",
"devices": ["iPhone 15-26"],
"onlyTesting": ["AcmeUITests/LoginTests"],
"buildTag": "nightly-412"
}'{ "build_id": "5b1e7c2a-9d4f-4e1b-8a63-2f0c7d9e4b18", "message": "Success" }Keep build_id to read the results.
The fields you will use
| Field | |
|---|---|
app, testSuite | The two farm:// URLs from uploading. Required. |
devices | 1 to 20 real iPhones or iPads. Required. Write each as "<model>-<iOS version>", e.g. "iPhone 15-26", or just "iPhone 15" for any iOS version. Copy names from the capability generator. |
onlyTesting, skipTesting | Run or skip only some tests. See below. |
buildTag | The build's name in the dashboard, e.g. a CI run number. |
runTimeout | Stop after this many minutes (1 to 120). |
Every field is in the API reference.
Choosing which tests run
With no filter, every test in the suite runs. The filters work like xcodebuild -only-testing and -skip-testing:
| Filter | Example | Runs |
|---|---|---|
onlyTesting | ["AcmeUITests"] | Every test in that test target |
onlyTesting | ["AcmeUITests/LoginTests"] | Every test in that class |
onlyTesting | ["AcmeUITests/LoginTests/testLoginFails"] | One test method |
skipTesting | ["AcmeUITests/SlowTests"] | Everything except that class |
AcmeUITests is the test_target the suite upload returned.
How it runs
- Each device gets its own session. All the selected tests run on it, one after another.
- The devices run at the same time, one per thread in your plan. Extra devices wait in the queue.
- A filter that matches no test ends as
error, never as a pass. - Real devices only. A simulator (
"virtual": true) is refused.
How long a run may take
At most 120 minutes per device. Use runTimeout for a shorter limit. Installing the app and Runner counts toward the time. A device also ends timedout if no test starts within 5 minutes.
Not available yet
Sharding, Xcode test plans, .xctestproducts, network logs, Local Tunnel, biometric simulation, camera image injection, simulators and upload by URL. Sending one of these fields is refused with a 400 that says so. You also cannot watch an XCUITest session live.
