Stop a test plan run
PUT
/execution_results/{run_id}Base URL
https://app.testsigma.com/api/v1RegionStop a running test plan execution or rerun. Setting result to STOPPED stops the run instead of updating it.
Authenticate with your API key as a
Bearer token in the Authorization header. How to authenticate →Path parameters
run_id | The ID of the run to stop, from the trigger response or the Run Results page URL. |
Request body
canStopAll | true stops all executions of the run; false stops only this one. Defaults to true. |
result | Set to STOPPED to stop the run. |
Response attributes
id | ID of the test plan result that was stopped. |
execution | The test plan details as a nested object, including its ID, name, and configuration. |
result | Result status of the test plan — STOPPED once the stop lands. |
status | Current status — STATUS_COMPLETED once stopped. |
message | Human-readable status message, such as "User stopped the Test Plan". |
duration | Run duration in milliseconds up to the stop. |
totalCount | Total number of test cases in the run. |
totalRunningCount | Total number of tests still running. |
Request
curl -X PUT \
'https://app.testsigma.com/api/v1/execution_results/{run_id}' \
-H 'Authorization: Bearer <API_KEY>' \
-H 'Content-Type: application/json' \
-d '{
"canStopAll": true,
"result": "STOPPED"
}'const response = await fetch('https://app.testsigma.com/api/v1/execution_results/{run_id}', {
method: 'PUT',
headers: {
'Authorization': 'Bearer <API_KEY>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
"canStopAll": true,
"result": "STOPPED"
})
});
const data = await response.json();import requests
response = requests.put(
'https://app.testsigma.com/api/v1/execution_results/{run_id}',
headers={
'Authorization': 'Bearer <API_KEY>',
'Content-Type': 'application/json'
},
json={
"canStopAll": true,
"result": "STOPPED"
}
)
data = response.json()Response200 OK
{
"id": 1165,
"executionId": 339,
"startTime": 1679304114000,
"endTime": 1679304125763,
"duration": 11763,
"result": "STOPPED",
"status": "STATUS_COMPLETED",
"message": "User stopped the Test Plan",
"executedBy": 12,
"totalCount": 1,
"runningCount": 1,
"totalRunningCount": 0,
"consolidatedResult": "STOPPED",
"consolidatedStatus": "STATUS_COMPLETED",
"resultType": "ORIGINAL"
}Was this page helpful?
Thanks for the feedback.