This section explains how to retrieve Test Suite execution results in a format usable by CI/CD tools.
Unlike the general lookup API, which returns execution status and summary statistics, this API provides detailed results formatted as JUnit XML or JSON.
You can integrate these results directly into external CI/CD pipelines such as Jenkins or GitHub Actions.
Endpoint #
[GET] /openapi/v3/test-suite-runs/{test_suite_run_id}/result
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 #
Key | Type | Required | Default | Description |
---|---|---|---|---|
test_suite_run_id | int | Yes | – | Test Suite Run ID returned in the response of the Test Suite execution API. |
Query String #
Key | Type | Required | Default | Description |
---|---|---|---|---|
data_type | “all” | “xml” | “json” | No | “all” | Format of the test result data to return. Options are XML or JSON. See result data format examples. |
Result Data Format (Examples) #
The Test Result API returns results in XML or JSON format, depending on the data_type value.
XML (JUnit Test Format) #
<?xml version="1.0" encoding="UTF-8"?>
<testsuites name="apptest.ai Test - Your project name">
<testsuite name="Used test suite name" id="112233">
<testcase device="Used device key" total_time="573.0">
<system-out>https://app.apptest.ai/team/123/mobile/project/456/tests/1/summary</system-out>
</testcase>
<testcase device="Used device key" total_time="175.0">
<error message="https://app.apptest.ai/team/123/mobile/project/456/tests/2/summary"/>
</testcase>
<testcase device="Used device key" total_time="157.0">
<error message="https://app.apptest.ai/team/123/mobile/project/456/tests/3/summary"/>
</testcase>
<testcase device="Used device key" total_time="572.0">
<system-out>https://app.apptest.ai/team/123/mobile/project/456/tests/4/summary</system-out>
</testcase>
</testsuite>
</testsuites>
Test Result Status | Returned XML Tag |
---|---|
Passed | <system-out>{Ptero test link}</system-out> |
Failed | <failure message=”{Ptero test link}”/> |
Aborted | <error message=”{Ptero test link}”/> |
JSON #
{
"testsuites": {
"name": "apptest.ai Test - Your project name",
"testsuite": [
{
"name": "Used test suite name",
"id": "112233",
"testcase": [
{
"device": "Used device key",
"total_time": "573.0",
"system-out": {
"contents": [
"https://app.apptest.ai/team/123/mobile/project/456/tests/1/summary"
]
}
},
{
"device": "Used device key",
"total_time": "175.0",
"error": {
"message": "https://app.apptest.ai/team/123/mobile/project/456/tests/2/summary"
}
},
{
"device": "Used device key",
"total_time": "157.0",
"error": {
"message": "https://app.apptest.ai/team/123/mobile/project/456/tests/3/summary"
}
},
{
"device": "Used device key",
"total_time": "572.0",
"system-out": {
"contents": [
"https://app.apptest.ai/team/123/mobile/project/456/tests/4/summary"
]
}
}
]
}
]
}
}