Flaky Tests: Quarantined Tests API
Flaky TestsA new Quarantined Tests API is now available to all Flaky Tests users. This API fetches a list of currently quarantined tests for a given repo, allowing organizations to implement custom workflows to review and fix quarantined tests.
1// https://api.trunk.io/v1/flaky-tests/list-quarantined-tests2// a sample response with a single quarantined flaky test3{4 "quarantined_tests": [5 {6 "name": "sums some nums > subtracts 1 from 2 to equal 1",7 "parent": "app/utils/subtract.test.ts",8 "file": null,9 "classname": "app/utils/subtract.test.ts",10 "status": "FLAKY",11 "codeowners": [],12 "quarantine_setting": "AUTO_QUARANTINE",13 "status_last_updated_at": "2025-02-13T15:52:03.000Z",14 "test_case_id": "48cd26cb-6333-528a-919f-ed597ee11715"15 }16 ],17 "page": {18 "total_rows": 1,19 "total_pages": 1,20 "next_page_token": "",21 "prev_page_token": "nUj35JF5aNJFjUkIakxff89f1b...",22 "last_page_token": "bVUNwekgkHadgZfSgwuac75640...",23 "page_index": 024 }25}
Dev teams are using the Quarantined Tests API to do things such as:
Automatically skip quarantined tests when testing locally
Check for any tests that should be manually un-quarantined
Determine what teams, projects, or modules have the most quarantined tests
Assign engineers to fix certain quarantined tests, based on recent code changes
Send Slack or email notifications to let teams know when the number of quarantined tests reaches a threshold
See the API reference for more information on required headers and payload.