Skip to content
Testsigma DOCS

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 →
executionIdTest Plan execution ID.
executionResultIdTest Plan execution result ID.
isReRunWhether this request is a rerun. Set to true.
reRunTypeTest cases to rerun — ALL_TESTS, ONLY_FAILED_TESTS, ALL_ITERATIONS, ONLY_FAILED_ITERATIONS, or USER_PICKED.
testCaseResultRequestsArray 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.
idID of the Test Plan Result.
executionNested Execution object with Test Plan details (id, applicationVersionId, name, description, etc.).
executionIdTest Plan execution ID.
startTimeEpoch timestamp when the rerun started.
endTimeEpoch timestamp when the rerun ended.
durationDuration of the execution.
resultResult status of the Test Plan — QUEUED, PASSED, FAILED, ABORTED, or STOPPED.
statusCurrent status of the Test Plan creation — e.g. STATUS_CREATED.
messageHuman-readable status message.
executedByID of the executor.
buildNoBuild number specified in the Test Plan trigger call.
environmentIdID of the selected environment.
totalCountTotal number of tests.
failedCountNumber of failed tests.
passedCountNumber of passed tests.
stoppedCountNumber of stopped tests.
notExecutedCountNumber of tests not executed.
queuedCountNumber of queued tests.
runningCountNumber of running tests.
reRunParentIdID of the parent execution result this rerun derives from.
triggeredTypeHow the Test Plan was triggered — API or via the Testsigma app.
totalRunningCountTotal number of running tests.
executionDetailsObject with global execution settings (timeouts, recovery action, screenshot option, prerequisite-fail actions, etc.).
totalQueuedCountTotal number of queued tests.
consolidatedResultConsolidated result across the execution.
consolidatedStatusConsolidated status across the execution.
resultTypeType of result — e.g. ORIGINAL.
isReRunEnabledWhether 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
}