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.

KeyTypeRequiredDefaultDescription
auth(username, access_key)Yes–Encrypted login credentials. Required for every API call.
usernamestringYes–Ptero login ID.
access_keystringYes–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.

KeyTypeRequiredDefaultDescription
test_suite_run_idintYes–Test Suite Run ID provided in the response of the Test Suite execution API.

Output

Content-Type: application/json

Success response

JSON
{
  "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_codereasondescription
401Could not verify your access levelUser not registered or invalid credentials.
V001Invalid valueInvalid request value (e.g., string passed for test_suite_run_id).
A010Access denied for test-suite runTest Suite Run ID does not exist, no access rights, or no executed tests found.
A007The service is currently under system maintenance.Service under maintenance.
E0001Internal Server ErrorServer-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}

KeyTypeRequiredDefaultDescription
auth(username, access_key)Yes–Encrypted login credentials. Required for every API call.
usernamestringYes–Ptero login ID.
access_keystringYes–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.

KeyTypeRequiredDefaultDescription
session_idintYes–Session ID returned in the response of the multi-test-suite-runs API.

Output

content-type: application/json

Success response

JSON
{
  "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_codereasondescription
401Could not verify your access levelInvalid user information or incorrect Access Key.
V001Invalid valueInvalid request value (e.g., string passed for session_id).
A011Access denied for sessionSession ID does not exist or no access rights.
A007The service is currently under system maintenance.Service under maintenance.
E0001Internal Server ErrorServer-side error.

Refer to Single Test Suite Run > Error Response Example for the error response format.