Stop a rerun
PUT
/execution_results
Base URL
https://app.testsigma.com/api/v1
Stop the rerun of already executing test cases from a test run result using REST API.
Authenticate with your API key as a
Bearer token in the
Authorization header. Generate a key →REQUEST BODY
canStopAll | Set true to stop all executions, or false to stop only some executions. Defaults to true. |
result | Result to set for the execution — e.g. STOPPED. |
RESPONSE ATTRIBUTES
id | ID of the Test Plan Result. |
execution | Nested Execution object with Test Plan details (id, applicationVersionId, name, description, etc.). |
executionId | Test Plan execution ID. |
startTime | Epoch timestamp when the execution started. |
endTime | Epoch timestamp when the execution ended. |
duration | Duration of the execution in milliseconds. |
result | Result status of the Test Plan — QUEUED, PASSED, FAILED, ABORTED, or STOPPED. |
status | Current status of the Test Plan creation — e.g. STATUS_COMPLETED. |
message | Human-readable status message. |
executedBy | ID of the executor. |
buildNo | Build number specified in the Test Plan trigger call. |
environmentId | ID of the selected environment. |
totalCount | Total number of tests. |
failedCount | Number of failed tests. |
passedCount | Number of passed tests. |
stoppedCount | Number of stopped tests. |
notExecutedCount | Number of tests not executed. |
queuedCount | Number of queued tests. |
runningCount | Number of running tests. |
triggeredType | How the Test Plan was triggered — API or MANUAL. |
totalRunningCount | Total number of running tests. |
executionDetails | Object with global execution settings (timeouts, recovery action, screenshot option, prerequisite-fail actions, etc.). |
totalQueuedCount | Total number of queued tests. |
consolidatedResult | Consolidated result across the execution. |
consolidatedStatus | Consolidated status across the execution. |
resultType | Type of result — e.g. ORIGINAL. |
REQUEST
curl -X PUT \
'https://app.testsigma.com/api/v1/execution_results' \
-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', {
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',
headers={
'Authorization': 'Bearer <API_KEY>',
'Content-Type': 'application/json'
},
json={
"canStopAll": true,
"result": "STOPPED"
}
)
data = response.json()RESPONSE200OK
{
"id": 1165,
"execution": {
"id": 339,
"applicationVersionId": 47,
"name": "12 small plan pass",
"description": null,
"mailList": "manoharkrishna@testsigma.com",
"elementTimeOut": 30,
"pageTimeOut": 30,
"environmentId": null,
"screenshot": "ALL_TYPES",
"recoveryAction": "Run_Next_Testcase",
"onAbortedAction": "Reuse_Session",
"onSuitePreRequisiteFail": "Abort",
"onStepPreRequisiteFail": "Run_Next_Testcase",
"reRunType": "NONE",
"isManual": false,
"applicationVersion": null,
"lastRun": null,
"slack": null,
"createdDate": 1677482960000,
"updatedDate": 1679304114000,
"createdById": 9,
"updatedById": 12,
"matchBrowserVersion": false,
"notificationStatusList": [
"1",
"0",
"9",
"5",
"3",
"6"
],
"msTeamsConnectorNotificationEnabled": false,
"retrySessionCreation": false,
"retrySessionCreationTimeout": null,
"lastRunId": 1165,
"googleChatConnectorNotificationEnabled": false,
"slackConnectorNotificationEnabled": false,
"entityType": "EXECUTION",
"environments": [],
"hookData": null,
"postHookId": null,
"postPlanHook": null,
"visualTestResultTimeOut": 2,
"onTestCasePreRequisiteFail": "Abort",
"executionType": "CUSTOM"
},
"executionId": 339,
"startTime": 1679304114000,
"endTime": 1679304125763,
"duration": 11763,
"result": "STOPPED",
"status": "STATUS_COMPLETED",
"message": "User stopped the Test Plan",
"executedBy": 12,
"buildNo": null,
"environmentId": null,
"totalCount": 1,
"failedCount": 0,
"passedCount": 0,
"stoppedCount": 0,
"notExecutedCount": 0,
"queuedCount": 0,
"runningCount": 1,
"visualTestResult": null,
"environment": null,
"childResult": null,
"reRunParentId": null,
"triggeredType": "MANUAL",
"totalRunningCount": 0,
"executionDetails": {
"page_timeout": 30,
"element_timeout": 30,
"recovery_action": "Run_Next_Testcase",
"on_aborted_action": "Reuse_Session",
"screenshot_option": "ALL_TYPES",
"group_prerequisite_fail": "Abort",
"test_case_prerequisite_fail": "Abort",
"test_step_prerequisite_fail": "Run_Next_Testcase",
"global_param_name": null
},
"totalQueuedCount": 0,
"mobileInspectionId": null,
"environmentResultsDTO": null,
"executionResultConfig": null,
"isReRunEnabled": false,
"consolidatedResult": "STOPPED",
"consolidatedStatus": "STATUS_COMPLETED",
"resultType": "ORIGINAL",
"consolidatedDuration": 11763,
"runTestCasesInParallel": false,
"runTestSuitesInParallel": false,
"scheduledId": null,
"testPlanHookResults": null
}