Flaky tests API
The flaky test API endpoint provides information about tests detected as flaky in a test suite.
List all flaky tests
Returns a paginated list of the flaky tests detected in a test suite.
curl -H "Authorization: Bearer $TOKEN" \
-X GET "https://api.buildkite.com/v2/analytics/organizations/{org.slug}/suites/{suite.slug}/flaky-tests"
[
{
"id": "01867216-8478-7fde-a55a-0300f88bb49b",
"web_url": "https://buildkite.com/organizations/my_great_org/analytics/suites/my_suite_name/tests/01867216-8478-7fde-a55a-0300f88bb49b",
"scope": "User#email",
"name": "is correctly formatted",
"location": "./spec/models/user_spec.rb:42",
"file_name": "./spec/models/user_spec.rb",
"instances": 1,
"latest_occurrence_at": "2024-07-15T00:07:02.547Z",
"most_recent_instance_at": "2024-07-15T00:07:02.547Z",
"last_resolved_at": null
}
]
Optional query string parameters:
search
|
Returns flaky tests with a name or scope that contains the search string. Users with the Ruby test collector installed can also filter results by location .
Example: |
---|---|
branch
|
Returns flaky tests for flakes detected one or more times on the branch whose name is specified by the branch value.
Example: |
Required scope: read_suites
Success response: 200 OK