Get the test results of an application pipeline run
import requests
url = "https://platform.ankra.app/api/v1/org/applications/{application_id}/pipeline-runs/{run_id}/tests"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://platform.ankra.app/api/v1/org/applications/{application_id}/pipeline-runs/{run_id}/tests', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request GET \
--url https://platform.ankra.app/api/v1/org/applications/{application_id}/pipeline-runs/{run_id}/tests \
--header 'Authorization: Bearer <token>'{
"run_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"has_reports": true,
"counts": {
"total": 1,
"passed": 1,
"failed": 1,
"skipped": 1,
"flaky": 1
},
"duration_ms": 1,
"is_truncated": true,
"reports": [
{
"artifact_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"report_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"step_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"stage": "<string>",
"format": "junit",
"status": "ingested",
"error_message": "<string>",
"counts": {
"total": 1,
"passed": 1,
"failed": 1,
"skipped": 1,
"flaky": 1
},
"duration_ms": 1,
"stored_count": 1,
"is_truncated": true,
"is_superseded": true
}
],
"failed": [
{
"test_key": "<string>",
"suite": "<string>",
"name": "<string>",
"file": "<string>",
"outcome": "passed",
"duration_ms": 1,
"attempts": 2,
"failure_message": "<string>",
"step_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"stage": "<string>"
}
],
"flaky": [
{
"test_key": "<string>",
"suite": "<string>",
"name": "<string>",
"file": "<string>",
"outcome": "passed",
"duration_ms": 1,
"attempts": 2,
"failure_message": "<string>",
"step_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"stage": "<string>"
}
],
"slowest": [
{
"test_key": "<string>",
"suite": "<string>",
"name": "<string>",
"file": "<string>",
"outcome": "passed",
"duration_ms": 1,
"attempts": 2,
"failure_message": "<string>",
"step_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"stage": "<string>"
}
]
}Pipelines
Get the test results of an application pipeline run
The test reports the run’s steps declared with test_results and what became of each, the tests by outcome across them, and the failed, flaky and slowest tests. Requires pipelines.read. Read-only.
GET
/
api
/
v1
/
org
/
applications
/
{application_id}
/
pipeline-runs
/
{run_id}
/
tests
Get the test results of an application pipeline run
import requests
url = "https://platform.ankra.app/api/v1/org/applications/{application_id}/pipeline-runs/{run_id}/tests"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://platform.ankra.app/api/v1/org/applications/{application_id}/pipeline-runs/{run_id}/tests', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request GET \
--url https://platform.ankra.app/api/v1/org/applications/{application_id}/pipeline-runs/{run_id}/tests \
--header 'Authorization: Bearer <token>'{
"run_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"has_reports": true,
"counts": {
"total": 1,
"passed": 1,
"failed": 1,
"skipped": 1,
"flaky": 1
},
"duration_ms": 1,
"is_truncated": true,
"reports": [
{
"artifact_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"report_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"step_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"stage": "<string>",
"format": "junit",
"status": "ingested",
"error_message": "<string>",
"counts": {
"total": 1,
"passed": 1,
"failed": 1,
"skipped": 1,
"flaky": 1
},
"duration_ms": 1,
"stored_count": 1,
"is_truncated": true,
"is_superseded": true
}
],
"failed": [
{
"test_key": "<string>",
"suite": "<string>",
"name": "<string>",
"file": "<string>",
"outcome": "passed",
"duration_ms": 1,
"attempts": 2,
"failure_message": "<string>",
"step_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"stage": "<string>"
}
],
"flaky": [
{
"test_key": "<string>",
"suite": "<string>",
"name": "<string>",
"file": "<string>",
"outcome": "passed",
"duration_ms": 1,
"attempts": 2,
"failure_message": "<string>",
"step_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"stage": "<string>"
}
],
"slowest": [
{
"test_key": "<string>",
"suite": "<string>",
"name": "<string>",
"file": "<string>",
"outcome": "passed",
"duration_ms": 1,
"attempts": 2,
"failure_message": "<string>",
"step_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"stage": "<string>"
}
]
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Query Parameters
How many of the slowest tests to list.
Required range:
0 <= x <= 50Response
The run's test results.
False when the run's steps declared no test report, which is not the same as every test passing.
Tests by outcome. flaky is a test that failed and then passed on a retry.
Show child attributes
Show child attributes
Required range:
x >= 0A report's tests were capped, or a list hit 500 entries.
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes