이 섹션은 Test Suite 실행 단위의 결과를 CI/CD 도구에서 활용 가능한 형식으로 조회하는 방법을 설명합니다.
일반 조회 API가 실행 상태와 성공/실패 통계 같은 요약 정보를 제공하는 반면,
이 API는 JUnit XML 또는 JSON 형식으로 가공된 세부 결과 데이터를 반환합니다.
이를 통해 Jenkins, GitHub Actions 같은 외부 CI/CD 파이프라인에 테스트 결과를 직접 연동할 수 있습니다.
엔드포인트 #
[GET] /openapi/v3/test-suite-runs/<test_suite_run_id>/result
인증 (Authorization) #
이 API를 호출하려면 username과 access_key를 조합한 Basic Auth 인증이 필요합니다.
key | type | required | default | description |
---|---|---|---|---|
auth | (username, access_key) | Y | – | 암호화된 로그인 정보. API 호출 시 반드시 필요 |
username | str | Y | – | Ptero 로그인 ID |
access_key | str | Y | – | Access Key (비밀번호 아님). 발급 위치: Ptero › 우측 상단 아이콘 › Edit Profile › Access Key |
Note
username:access_key 문자열을 base64 인코딩하여 Authorization 헤더에 포함해야 합니다.
경로 파라미터 (Path Parameter) #
key | type | required | default | description |
---|---|---|---|---|
test_suite_run_id | int | Y | – | 테스트 실행 API 응답에서 전달된 Test Suite Run ID |
쿼리 스트링 (Query String) #
key | type | required | default | description |
---|---|---|---|---|
data_type | “all” | “xml” | “json” | N | “all” | 반환받을 테스트 결과 데이터 형식 (XML, JSON 선택 가능). 결과 데이터 형식 예시 참고 |
결과 데이터 형식 (Format Examples) #
테스트 Result API는 data_type 값에 따라 XML, JSON 형식으로 결과를 반환합니다.
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>
테스트 결과 상태 | 반환되는 XML 태그 |
---|---|
Passed | <system-out>{Ptero test 링크}</system-out> |
Failed | <failure message=”{Ptero test 링크}”/> |
Aborted | <error message=”{Ptero test 링크}”/> |
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"
]
}
}
]
}
]
}
}