Skip to content
Testsigma DOCS

List test runs for a test plan

GET/projects/:project_id/test_plans/:test_plan_id/test_runs

Base URL  https://test-management.testsigma.com/api/v1

Retrieves the test runs associated with a specific test plan.

Authenticate with your API key as a Bearer token in the Authorization header. Generate a key →
project_idUnique identifier of the project that contains the test plan.
test_plan_idUnique identifier of the test plan whose test runs are listed.
messageStatus message for the request; may be empty.
data.test_runs[].idUnique identifier of the test run.
data.test_runs[].statusCurrent status of the test run (e.g., PASSED, FAILED).
data.test_runs[].started_atUnix timestamp indicating when the test run started.
data.test_runs[].ended_atUnix timestamp indicating when the test run ended.
data.test_runs[].durationTotal time taken for the test run, in seconds.
data.test_runs[].resultsDetailed results of the test execution.
page_info.page_sizeNumber of items returned per page.
page_info.total_countTotal number of test runs available.
page_info.nextURL to the next page of results, if any.
page_info.prevURL to the previous page of results, if any.
REQUEST
curl -X GET \
  'https://test-management.testsigma.com/api/v1/projects/:project_id/test_plans/:test_plan_id/test_runs' \
  -H 'Authorization: Bearer <API_KEY>' \
  -H 'Content-Type: application/json'
const response = await fetch('https://test-management.testsigma.com/api/v1/projects/:project_id/test_plans/:test_plan_id/test_runs', {
  method: 'GET',
  headers: {
    'Authorization': 'Bearer <API_KEY>',
    'Content-Type': 'application/json'
  }
});
const data = await response.json();
import requests

response = requests.get(
  'https://test-management.testsigma.com/api/v1/projects/:project_id/test_plans/:test_plan_id/test_runs',
  headers={
    'Authorization': 'Bearer <API_KEY>',
    'Content-Type': 'application/json'
  }
)
data = response.json()
RESPONSE200OK
{
  "message": "",
  "data": {
    "test_runs": [
      {
        "id": "8756d172-0c4f-4e37-9493-30a67d321863",
        "status": "PASSED",
        "started_at": 1710374400,
        "ended_at": 1710378000,
        "duration": 3600,
        "results": {
          "total": 42,
          "passed": 42,
          "failed": 0
        }
      },
      {
        "id": "c0e4b9a1-2d76-4f53-91ac-5b8e3f6d20c7",
        "status": "FAILED",
        "started_at": 1710460800,
        "ended_at": 1710465300,
        "duration": 4500,
        "results": {
          "total": 42,
          "passed": 38,
          "failed": 4
        }
      }
    ]
  },
  "page_info": {
    "page_size": 2,
    "total_count": 5,
    "next": "https://test-management.testsigma.com/api/v1/projects/bd57bbc6-e83e-4f09-927d-fc48b3509cdf/test_plans/8756d172-0c4f-4e37-9493-30a67d321863/test_runs?page_size=2&page=2",
    "prev": ""
  }
}