Start a test on a device session
Starts a new test on the session. From this point on we start recording what happens on the device. This lets you mark the start of a test that you are executing on the device. Afterwards you define whether the test passed or failed, and you review it on the Test Results page in the Sauce Labs UI, just like any other job you ran on Sauce Labs.
The response contains the jobId. Use the links returned by getTests to fetch the report through the 'jobs' API.
Only one test can be active on a session at a time — call endTest to finish the current test before starting the next one. If you created the session with autoStartTest, a test is already running on it, so end that one first or this call comes back as a 409. A session can hold at most 500 tests.
Artifact capture (video, device logs, network capture, and so on) is opt-in: every toggle defaults to false. Request the artifacts you need in the artifacts object and they are recorded for the duration of the test.
The request body is optional. If you omit it, the test is created with a generated name, no build, no tags, and no artifacts.
Request
- Base URLhttps://api.us-west-1.saucelabs.com/rdc/v2
- AuthHTTP basic
- TypeScriptA function with typed inputs. Its response is checked against the schema.
Path parameters
The id of the device session
Request body
Example request
{
"testName": "Checkout flow — guest user",
"build": "build-1042",
"tags": [
"smoke",
"checkout"
]
}Response
Test started
Example response
{
"jobId": "123e4567-e89b-12d3-a456-426614174000"
}Changes
No recorded changes to this operation across all 1 revision of this API.