Trigger a rerun
POST
/execution_results
Base URL
https://app.testsigma.com/api/v1
Trigger the rerun of selected 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
executionId | Test Plan execution ID. |
executionResultId | Test Plan execution result ID. |
isReRun | Whether this request is a rerun. Set to true. |
reRunType | Test cases to rerun — ALL_TESTS, ONLY_FAILED_TESTS, ALL_ITERATIONS, ONLY_FAILED_ITERATIONS, or USER_PICKED. |
testCaseResultRequests | Array of Test Case result objects to rerun, each identified by id. For data-driven cases also accepts iterationReRunType (ALL/FAILED/PASSED/USER_PICKED) and iterationResultIds. |
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 rerun started. |
endTime | Epoch timestamp when the rerun ended. |
duration | Duration of the execution. |
result | Result status of the Test Plan — QUEUED, PASSED, FAILED, ABORTED, or STOPPED. |
status | Current status of the Test Plan creation — e.g. STATUS_CREATED. |
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. |
reRunParentId | ID of the parent execution result this rerun derives from. |
triggeredType | How the Test Plan was triggered — API or via the Testsigma app. |
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. |
isReRunEnabled | Whether rerun is enabled for this result. |
REQUEST
curl -X POST \
'https://app.testsigma.com/api/v1/execution_results' \
-H 'Authorization: Bearer <API_KEY>' \
-H 'Content-Type: application/json' \
-d '{
"executionId": 336,
"executionResultId": 467,
"isReRun": true,
"reRunType": "USER_PICKED",
"testCaseResultRequests": [
{
"id": 2880
},
{
"id": 2874
}
]
}'const response = await fetch('https://app.testsigma.com/api/v1/execution_results', {
method: 'POST',
headers: {
'Authorization': 'Bearer <API_KEY>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
"executionId": 336,
"executionResultId": 467,
"isReRun": true,
"reRunType": "USER_PICKED",
"testCaseResultRequests": [
{
"id": 2880
},
{
"id": 2874
}
]
})
});
const data = await response.json();import requests
response = requests.post(
'https://app.testsigma.com/api/v1/execution_results',
headers={
'Authorization': 'Bearer <API_KEY>',
'Content-Type': 'application/json'
},
json={
"executionId": 336,
"executionResultId": 467,
"isReRun": true,
"reRunType": "USER_PICKED",
"testCaseResultRequests": [
{
"id": 2880
},
{
"id": 2874
}
]
}
)
data = response.json()RESPONSE200OK
{
"id": 487,
"execution": null,
"executionId": 336,
"startTime": 1679291448332,
"endTime": null,
"duration": null,
"result": "QUEUED",
"status": "STATUS_CREATED",
"message": "Test Plan execution is initiated and waiting to be queued",
"executedBy": 10,
"buildNo": null,
"environmentId": null,
"totalCount": 0,
"failedCount": 0,
"passedCount": 0,
"stoppedCount": 0,
"notExecutedCount": 0,
"queuedCount": 0,
"runningCount": 0,
"visualTestResult": null,
"environment": null,
"childResult": null,
"reRunParentId": 469,
"triggeredType": "API",
"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": "QUEUED",
"consolidatedStatus": "STATUS_CREATED",
"resultType": "ORIGINAL",
"consolidatedDuration": null,
"runTestCasesInParallel": false,
"runTestSuitesInParallel": false,
"scheduledId": null,
"testPlanHookResults": null
}