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 →PATH PARAMETERS
project_id | Unique identifier of the project that contains the test plan. |
test_plan_id | Unique identifier of the test plan whose test runs are listed. |
RESPONSE ATTRIBUTES
message | Status message for the request; may be empty. |
data.test_runs[].id | Unique identifier of the test run. |
data.test_runs[].status | Current status of the test run (e.g., PASSED, FAILED). |
data.test_runs[].started_at | Unix timestamp indicating when the test run started. |
data.test_runs[].ended_at | Unix timestamp indicating when the test run ended. |
data.test_runs[].duration | Total time taken for the test run, in seconds. |
data.test_runs[].results | Detailed results of the test execution. |
page_info.page_size | Number of items returned per page. |
page_info.total_count | Total number of test runs available. |
page_info.next | URL to the next page of results, if any. |
page_info.prev | URL 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": ""
}
}