Test Results

End the active test on a device session

Ends the test that is currently active on the session and reports its result. Any artifact recordings started by startTest are stopped and collected. Collection happens asynchronously, so the artifacts appear on the test shortly after the call returns.

Once the test is ended, the session is free to start the next one. The session itself stays active; closing the session while a test is running ends that test automatically.

The request body is optional. Omit it, or omit status, and the test is stored without a pass/fail result.

post/sessions/{sessionId}/endTest

Request

Path parameters

sessionIdstring required

The id of the device session

Request body

status'passed' | 'failed'

The test result. Case insensitive. Omit to leave the result undefined.

Example request

{
  "status": "passed"
}

Response

Test ended

jobIdstring

The Sauce Labs job id of the test that was ended.

statusstring

The status stored on the test.

Example response

{
  "jobId": "123e4567-e89b-12d3-a456-426614174000",
  "status": "passed"
}

Changes

No recorded changes to this operation across all 1 revision of this API.