Test result lookup
On this page
This section explains how to retrieve execution results of Test Suites within a project.
It covers both single Test Suite result lookup and multiple Test Suite result lookup APIs.
Single test suite result lookup
This API retrieves the results of a specific Test Suite execution.
Endpoint
[GET] /openapi/v3/test-suite-runs/{test_suite_run_id}
Authorization
This API requires Basic Authentication using a combination of username and access_key.
| Key | Type | Required | Default | Description |
|---|---|---|---|---|
| auth | (username, access_key) | Yes | – | Encrypted login credentials. Required for every API call. |
| username | string | Yes | – | Ptero login ID. |
| access_key | string | Yes | – | Access Key (not your password). Issued in Ptero › Top-right icon › Edit Profile › Access Key. |
Note
Encode the string username:access_key in Base64 and include it in the Authorization header.
Path parameter
API calls must include the Test Suite Run ID in the request path.
| Key | Type | Required | Default | Description |
|---|---|---|---|---|
| test_suite_run_id | int | Yes | – | Test Suite Run ID provided in the response of the Test Suite execution API. |
Output
Content-Type: application/json
Success response
{
"error_code": 0,
"reason": "",
"result": "success",
"data": {
"status": "running" | "complete",
"pid": 123,
"project_name": "Sample Project",
"total_test_count": 10,
"test_run_count": 8,
"status_detail": {
"aborted": 0,
"failed": 1,
"passed": 6,
"stopped": 0,
"warning": 1,
"running": 0,
"pending": 0
}
}
}- status – Execution status. running = in progress, complete = finished.
- pid – Project ID.
- project_name – Project name.
- total_test_count – Total number of tests to be generated from the Test Suite.
- test_run_count – Number of tests actually generated (sum of values in status_detail).
- status_detail – Number of tests by status:
- aborted – Aborted by system.
- failed – Failed.
- passed – Passed.
- stopped – Stopped by user.
- warning – Marked with warning.
- running – In progress (including initializing).
- pending – Waiting to be executed.
| error_code | reason | description |
|---|---|---|
| 401 | Could not verify your access level | User not registered or invalid credentials. |
| V001 | Invalid value | Invalid request value (e.g., string passed for test_suite_run_id). |
| A010 | Access denied for test-suite run | Test Suite Run ID does not exist, no access rights, or no executed tests found. |
| A007 | The service is currently under system maintenance. | Service under maintenance. |
| E0001 | Internal Server Error | Server-side error. |
Refer to Single Test Suite Run > Error Response Example for the error response format.
Multiple test suite result lookup
This API retrieves the execution results of multiple Test Suites that were run together.
Each execution is identified by a session_id, and the API looks up results for the specified session.
Endpoint
[GET] /openapi/v3/multi-test-suite-runs/{session_id}
| Key | Type | Required | Default | Description |
|---|---|---|---|---|
| auth | (username, access_key) | Yes | – | Encrypted login credentials. Required for every API call. |
| username | string | Yes | – | Ptero login ID. |
| access_key | string | Yes | – | Access Key (not your password). Issued in Ptero › Top-right icon › Edit Profile › Access Key. |
Note
Encode the string username:access_key in Base64 and include it in the Authorization header.
Path parameter
API calls must include the Session ID in the request path.
| Key | Type | Required | Default | Description |
|---|---|---|---|---|
| session_id | int | Yes | – | Session ID returned in the response of the multi-test-suite-runs API. |
Output
content-type: application/json
Success response
{
"error_code": 0,
"reason": "",
"result": "success",
"data": {
"status": "running" | "complete",
"pid": 123,
"project_name": "My Project",
"total_test_count": 10,
"test_run_count": 8,
"status_detail": {
"aborted": 0,
"failed": 1,
"passed": 6,
"stopped": 0,
"warning": 1,
"running": 0,
"pending": 0
},
"test_suite_runs": [
{
"status": "complete",
"test_suite_run_id": 789,
"test_suite_name": "Login Test Suite",
"total_test_count": 5,
"test_run_count": 5,
"status_detail": {
"aborted": 0,
"failed": 0,
"passed": 5,
"stopped": 0,
"warning": 0,
"running": 0,
"pending": 0
}
}
]
}
}- status – Execution status. running = in progress, complete = finished.
- pid – Project ID.
- project_name – Project name.
- total_test_count – Total number of tests to be generated from the session request.
- test_run_count – Number of tests actually generated (sum of all status_detail values).
- status_detail – Number of tests by status:
- aborted – Aborted by system.
- failed – Failed.
- passed – Passed.
- stopped – Stopped by user.
- warning – Warning.
- running – In progress.
- pending – Waiting to start.
- test_suite_runs – List of individual Test Suite execution results:
- test_suite_run_id – Test Suite execution ID.
- test_suite_name – Test Suite name.
- total_test_count – Total number of tests expected for the Test Suite.
- test_run_count – Number of tests actually generated.
- status_detail – Number of tests by status for the Test Suite.
Error response
| error_code | reason | description |
|---|---|---|
| 401 | Could not verify your access level | Invalid user information or incorrect Access Key. |
| V001 | Invalid value | Invalid request value (e.g., string passed for session_id). |
| A011 | Access denied for session | Session ID does not exist or no access rights. |
| A007 | The service is currently under system maintenance. | Service under maintenance. |
| E0001 | Internal Server Error | Server-side error. |
Refer to Single Test Suite Run > Error Response Example for the error response format.