Skip to content
Testsigma DOCS

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 →
project_idUnique identifier of the project the test run belongs to.
titleTitle of the test run.
descriptionBrief description of the test run.
statusStatus of the test run (e.g. ACTIVE).
project_idUnique identifier of the project the test run belongs to.
human_idHuman-readable identifier for the test run.
selection_typeType of test case selection (e.g. STATIC).
static_selection_filtersArray of filters used to select the test cases included in the run.
static_selection_filters[].fieldField the filter is applied to (e.g. id).
static_selection_filters[].operatorOperator used for filtering (e.g. IN).
static_selection_filters[].valuesArray of values to match against the field.
start_dateStart date of the test run as a Unix timestamp.
end_dateEnd date of the test run as a Unix timestamp.
assignee_idUnique identifier of the user assigned to the test run.
label_namesArray of labels associated with the test run.
environment_idsArray of environment identifiers the test run executes against.
messageStatus message for the request; may be empty.
data.test_run.idUnique identifier of the created test run.
data.test_run.human_idHuman-readable identifier for the test run.
data.test_run.created_atUnix timestamp of when the test run was created.
data.test_run.updated_atUnix timestamp of the last update to the test run.
data.test_run.titleTitle of the test run.
data.test_run.descriptionDescription of the test run.
data.test_run.statusStatus of the test run.
data.test_run.project_idUnique identifier of the project the test run belongs to.
data.test_run.selection_typeType of test case selection used for the run.
data.test_run.start_dateStart date of the test run as a Unix timestamp.
data.test_run.end_dateEnd date of the test run as a Unix timestamp.
data.test_run.assignee_idUnique identifier of the user assigned to the test run.
data.test_run.label_namesLabels associated with the test run.
data.test_run.environment_idsEnvironment 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": []
    }
  }
}