Skip to content
Testsigma DOCS

Trigger a test plan

POST/execution_results

Base URL  https://app.testsigma.com/api/v1

Trigger a Test Plan execution remotely. Useful for fully automating continuous testing within a CI/CD pipeline integrated with tools such as Jenkins, TravisCI, GitLab, Codeship, or CircleCI.

Authenticate with your API key as a Bearer token in the Authorization header. Generate a key →
executionIdID of the Test Plan to execute.
environmentIdOptional. ID of the environment to run the test plan in.
executionConfigOptional. Saved Execution Config for partial test plan runs; supply either its name or its id.
uploadVersionsOptional. Map of Device_ID to UPLOAD_VERSION_ID to use specific uploaded app versions.
idRun ID of the triggered Test Plan run; use it to check live status.
executionTest Plan details object; null on the initial trigger response.
executionIdID of the Test Plan that was triggered.
startTimeEpoch timestamp when the run started.
endTimeEpoch timestamp when the run ended. Null while running.
durationRun duration in milliseconds. Null while running.
resultResult status of the Test Plan - QUEUED, PASSED, FAILED, ABORTED, or STOPPED.
statusCurrent status of the Test Plan creation - STATUS_CREATED.
messageHuman-readable status message.
executedByID of the executor.
buildNoBuild number specified in the Test Plan trigger call.
environmentIdEnvironment ID selected for the run.
totalCountTotal number of test cases in the run.
failedCountNumber of failed test cases.
passedCountNumber of passed test cases.
abortedCountNumber of aborted test cases.
stoppedCountNumber of stopped test cases.
notExecutedCountNumber of not-executed test cases.
preRequisiteFailedCountNumber of test cases that failed prerequisites.
queuedCountNumber of queued test cases.
isVisuallyPassedWhether visual testing passed. True or False.
environmentEnvironment parameter selected for the Test Plan.
childResultChild result reference.
reRunParentIdParent run ID if this run is a re-run.
reRunTypeType of re-run.
triggeredTypeHow the run was triggered - API or via the Testsigma App.
totalRunningCountTotal number of running tests.
executionDetailsObject describing run configuration - timeouts, recovery actions, screenshot option, prerequisite handling.
totalQueuedCountTotal number of queued tests.
REQUEST
curl -X POST \
  'https://app.testsigma.com/api/v1/execution_results' \
  -H 'Authorization: Bearer <API_KEY>' \
  -H 'Content-Type: application/json' \
  -d '{
    "executionId": 274,
    "executionConfig": {
      "name": "config 2",
      "id": "2"
    },
    "uploadVersions": {
      "<Device_ID>": "<UPLOAD_VERSION_ID>"
    }
  }'
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": 274,
      "executionConfig": {
          "name": "config 2",
          "id": "2"
      },
      "uploadVersions": {
          "<Device_ID>": "<UPLOAD_VERSION_ID>"
      }
  })
});
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": 274,
      "executionConfig": {
          "name": "config 2",
          "id": "2"
      },
      "uploadVersions": {
          "<Device_ID>": "<UPLOAD_VERSION_ID>"
      }
  }
)
data = response.json()
RESPONSE200OK
{
  "id": 337,
  "execution": null,
  "executionId": 274,
  "startTime": 1633612675726,
  "endTime": null,
  "duration": null,
  "result": "QUEUED",
  "status": "STATUS_CREATED",
  "message": "Test Plan execution is initiated and waiting to be queued",
  "executedBy": 43,
  "buildNo": null,
  "environmentId": null,
  "totalCount": 0,
  "failedCount": 0,
  "passedCount": 0,
  "abortedCount": 0,
  "stoppedCount": 0,
  "notExecutedCount": 0,
  "preRequisiteFailedCount": 0,
  "queuedCount": 0,
  "isVisuallyPassed": null,
  "environment": null,
  "childResult": null,
  "reRunParentId": null,
  "reRunType": null,
  "triggeredType": "API",
  "totalRunningCount": 0,
  "executionDetails": {
    "page_timeout": 30,
    "element_timeout": 30,
    "recovery_action": "Run_Next_Testcase",
    "on_aborted_action": "Reuse_Session",
    "screenshot_option": "FAILED_STEPS",
    "group_prerequisite_fail": "Abort",
    "test_case_prerequisite_fail": "Abort",
    "test_step_prerequisite_fail": "Run_Next_Testcase",
    "global_param_name": null
  },
  "totalQueuedCount": 0
}