Skip to content
Testsigma DOCS

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 →
canStopAllSet true to stop all executions, or false to stop only some executions. Defaults to true.
resultResult to set for the execution — e.g. STOPPED.
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 execution started.
endTimeEpoch timestamp when the execution ended.
durationDuration of the execution in milliseconds.
resultResult status of the Test Plan — QUEUED, PASSED, FAILED, ABORTED, or STOPPED.
statusCurrent status of the Test Plan creation — e.g. STATUS_COMPLETED.
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.
triggeredTypeHow the Test Plan was triggered — API or MANUAL.
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.
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
}