Create a test run
POST
/projects/:project_id/test_runs
Base URL
https://test-management.testsigma.com/api/v1
Creates a new test run in a project from a static selection of test cases.
Authenticate with your API key as a
Bearer token in the
Authorization header. Generate a key →PATH PARAMETERS
project_id | Unique identifier of the project the test run belongs to. |
REQUEST BODY
title | Title of the test run. |
description | Brief description of the test run. |
status | Status of the test run (e.g. ACTIVE). |
project_id | Unique identifier of the project the test run belongs to. |
human_id | Human-readable identifier for the test run. |
selection_type | Type of test case selection (e.g. STATIC). |
static_selection_filters | Array of filters used to select the test cases included in the run. |
static_selection_filters[].field | Field the filter is applied to (e.g. id). |
static_selection_filters[].operator | Operator used for filtering (e.g. IN). |
static_selection_filters[].values | Array of values to match against the field. |
start_date | Start date of the test run as a Unix timestamp. |
end_date | End date of the test run as a Unix timestamp. |
assignee_id | Unique identifier of the user assigned to the test run. |
label_names | Array of labels associated with the test run. |
environment_ids | Array of environment identifiers the test run executes against. |
RESPONSE ATTRIBUTES
message | Status message for the request; may be empty. |
data.test_run.id | Unique identifier of the created test run. |
data.test_run.human_id | Human-readable identifier for the test run. |
data.test_run.created_at | Unix timestamp of when the test run was created. |
data.test_run.updated_at | Unix timestamp of the last update to the test run. |
data.test_run.title | Title of the test run. |
data.test_run.description | Description of the test run. |
data.test_run.status | Status of the test run. |
data.test_run.project_id | Unique identifier of the project the test run belongs to. |
data.test_run.selection_type | Type of test case selection used for the run. |
data.test_run.start_date | Start date of the test run as a Unix timestamp. |
data.test_run.end_date | End date of the test run as a Unix timestamp. |
data.test_run.assignee_id | Unique identifier of the user assigned to the test run. |
data.test_run.label_names | Labels associated with the test run. |
data.test_run.environment_ids | Environment identifiers the test run executes against. |
REQUEST
curl -X POST \
'https://test-management.testsigma.com/api/v1/projects/:project_id/test_runs' \
-H 'Authorization: Bearer <API_KEY>' \
-H 'Content-Type: application/json' \
-d '{
"title": "Regression suite — patient portal",
"description": "Executing regression test cases",
"status": "ACTIVE",
"project_id": "c47ade67-0543-4582-a4a5-b7de447c94f5",
"human_id": "DEMO-001",
"selection_type": "STATIC",
"static_selection_filters": [
{
"field": "id",
"operator": "IN",
"values": [
"9ac271b6-4e89-4c93-8c75-2d625efa0b2d"
]
}
],
"start_date": 1710675200,
"end_date": 1710761600,
"assignee_id": "cbbc40a5-26e9-4b88-8c27-3626c9fbdaa4",
"label_names": [
"Smoke",
"Regression"
],
"environment_ids": []
}'const response = await fetch('https://test-management.testsigma.com/api/v1/projects/:project_id/test_runs', {
method: 'POST',
headers: {
'Authorization': 'Bearer <API_KEY>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
"title": "Regression suite — patient portal",
"description": "Executing regression test cases",
"status": "ACTIVE",
"project_id": "c47ade67-0543-4582-a4a5-b7de447c94f5",
"human_id": "DEMO-001",
"selection_type": "STATIC",
"static_selection_filters": [
{
"field": "id",
"operator": "IN",
"values": [
"9ac271b6-4e89-4c93-8c75-2d625efa0b2d"
]
}
],
"start_date": 1710675200,
"end_date": 1710761600,
"assignee_id": "cbbc40a5-26e9-4b88-8c27-3626c9fbdaa4",
"label_names": [
"Smoke",
"Regression"
],
"environment_ids": []
})
});
const data = await response.json();import requests
response = requests.post(
'https://test-management.testsigma.com/api/v1/projects/:project_id/test_runs',
headers={
'Authorization': 'Bearer <API_KEY>',
'Content-Type': 'application/json'
},
json={
"title": "Regression suite — patient portal",
"description": "Executing regression test cases",
"status": "ACTIVE",
"project_id": "c47ade67-0543-4582-a4a5-b7de447c94f5",
"human_id": "DEMO-001",
"selection_type": "STATIC",
"static_selection_filters": [
{
"field": "id",
"operator": "IN",
"values": [
"9ac271b6-4e89-4c93-8c75-2d625efa0b2d"
]
}
],
"start_date": 1710675200,
"end_date": 1710761600,
"assignee_id": "cbbc40a5-26e9-4b88-8c27-3626c9fbdaa4",
"label_names": [
"Smoke",
"Regression"
],
"environment_ids": []
}
)
data = response.json()RESPONSE200OK
{
"message": "",
"data": {
"test_run": {
"id": "7b2f9c14-58a1-4d2e-9f3a-6c1e8d40a2b9",
"human_id": "DEMO-R-1",
"created_at": 1710675200,
"updated_at": 1710675200,
"title": "Regression suite — patient portal",
"description": "Executing regression test cases",
"status": "ACTIVE",
"project_id": "c47ade67-0543-4582-a4a5-b7de447c94f5",
"selection_type": "STATIC",
"start_date": 1710675200,
"end_date": 1710761600,
"assignee_id": "cbbc40a5-26e9-4b88-8c27-3626c9fbdaa4",
"label_names": [
"Smoke",
"Regression"
],
"environment_ids": []
}
}
}