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 →REQUEST BODY
executionId | ID of the Test Plan to execute. |
environmentId | Optional. ID of the environment to run the test plan in. |
executionConfig | Optional. Saved Execution Config for partial test plan runs; supply either its name or its id. |
uploadVersions | Optional. Map of Device_ID to UPLOAD_VERSION_ID to use specific uploaded app versions. |
RESPONSE ATTRIBUTES
id | Run ID of the triggered Test Plan run; use it to check live status. |
execution | Test Plan details object; null on the initial trigger response. |
executionId | ID of the Test Plan that was triggered. |
startTime | Epoch timestamp when the run started. |
endTime | Epoch timestamp when the run ended. Null while running. |
duration | Run duration in milliseconds. Null while running. |
result | Result status of the Test Plan - QUEUED, PASSED, FAILED, ABORTED, or STOPPED. |
status | Current status of the Test Plan creation - STATUS_CREATED. |
message | Human-readable status message. |
executedBy | ID of the executor. |
buildNo | Build number specified in the Test Plan trigger call. |
environmentId | Environment ID selected for the run. |
totalCount | Total number of test cases in the run. |
failedCount | Number of failed test cases. |
passedCount | Number of passed test cases. |
abortedCount | Number of aborted test cases. |
stoppedCount | Number of stopped test cases. |
notExecutedCount | Number of not-executed test cases. |
preRequisiteFailedCount | Number of test cases that failed prerequisites. |
queuedCount | Number of queued test cases. |
isVisuallyPassed | Whether visual testing passed. True or False. |
environment | Environment parameter selected for the Test Plan. |
childResult | Child result reference. |
reRunParentId | Parent run ID if this run is a re-run. |
reRunType | Type of re-run. |
triggeredType | How the run was triggered - API or via the Testsigma App. |
totalRunningCount | Total number of running tests. |
executionDetails | Object describing run configuration - timeouts, recovery actions, screenshot option, prerequisite handling. |
totalQueuedCount | Total 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
}