Get Quality Gate Status API in Test Observability
Use this API to get the Quality Gate status programmatically and automate workflows in your CI/CD.
To learn more about Quality Gate, read further here..
For a ready to use script that can access this API, assert the Quality Gate result and automate your pipeline, read further here..
Get Quality Gate Status
Request parameters
Request
curl -u "YOUR_USERNAME:YOUR_ACCESS_KEY" \
https://api-observability.browserstack.com/ext/v1/quality-gates/{build_uuid}
-
No parameter required. Include the Build UUID at the end of the URL.
Response Attributes 200 OK
JSON
Response
{
"status": "passed",
"build_uuid": "ecgzpgx01jb9yysbavaq8nguu1zivn3kolphvhco",
"build_url": "https://observability.browserstack.com/projects/TestProject/builds/SampleBuild/16",
"quality_gate_result": "passed",
"quality_profiles": [
{
"id": "b7b534ae-8258-4b30-a76d-b4bbac15c74e",
"name": "Browserstack Default Profile",
"type": "pass if",
"result": "passed",
"rules": [
{
"condition": "Flaky in the overall build is less than 15%",
"value": "passed",
"result": "0.00",
"regex": null,
"testTags": null,
"folders": null,
"alert": null
},
{
"condition": "New failure is not mapped to Any Tests in the build",
"value": "passed",
"result": "Absent",
"regex": null,
"testTags": null,
"folders": null,
"alert": null
},
{
"condition": "New Unique Error is not detected from the last 1 builds for Any Tests",
"value": "passed",
"result": "0",
"regex": null,
"testTags": null,
"folders": null,
"alert": null
},
{
"condition": "Failure category Product bug is not automatically mapped to any tests in the build",
"value": "passed",
"result": "Absent",
"regex": null,
"testTags": null,
"folders": null,
"alert": null
}
]
}
]
}
-
status String
The build status.
-
build_uuid String
Unique ID of the build run. Also referred to as build uuid in some places.
-
observability_url String
URL to the build run on Test Observability.
-
quality_gate_result String
Status of the Quality Gate evaluation. Possible values are “passed”, “failed”, “unknown”, “skipped”, and “running”
-
quality_profiles Array
An array of the various Quality Profiles, their statuses and the different rules and configurations within them.
We're sorry to hear that. Please share your feedback so we can do better
Contact our Support team for immediate help while we work on improving our docs.