Skip to content
You're viewing the v2 docs. Looking for v1?Go to v1 docs
Docs
Testsigma
Popular questions
↑↓ to navigate↵ to selectesc to close
Book a demo

Stop a test plan run

PUT/execution_results/{run_id}
Base URL https://app.testsigma.com/api/v1Region

Stop 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 →
run_idThe ID of the run to stop, from the trigger response or the Run Results page URL.
canStopAlltrue stops all executions of the run; false stops only this one. Defaults to true.
resultSet to STOPPED to stop the run.
idID of the test plan result that was stopped.
executionThe test plan details as a nested object, including its ID, name, and configuration.
resultResult status of the test plan — STOPPED once the stop lands.
statusCurrent status — STATUS_COMPLETED once stopped.
messageHuman-readable status message, such as "User stopped the Test Plan".
durationRun duration in milliseconds up to the stop.
totalCountTotal number of test cases in the run.
totalRunningCountTotal 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?