Get Flaky Tests
analytics_list_flaky_testsLists tests that TestMu AI Test Intelligence marks as flaky in a date range, with each test's flake rate, build and environment. Test Intelligence flags a test as flaky from its status changing across runs of the same test name (or, when the org chose that setting, from failing with different errors across consecutive runs), and needs at least 10 runs of that test. flake_rate is a ratio from 0 to 1 of flaky runs to all runs (0.4 means 40%). Returns only flaky tests, plus how many tests were scanned. Flakiness is only computed for about the last 7 days of tests; the response says how many tests in the range had it.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "analytics_list_flaky_tests"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Maximum flaky tests to return, 1 to 200. Defaults to 50. | |
| toDate | No | End date, YYYY-MM-DD (UTC), included. Defaults to today. | |
| fromDate | No | Start date, YYYY-MM-DD (UTC), no earlier than 59 days before today (older results are not served). Defaults to 30 days before toDate. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| toDate | Yes | ||
| fromDate | Yes | ||
| truncated | Yes | True when tests_in_range is larger than tests_scanned. | |
| flaky_count | Yes | ||
| flaky_tests | Yes | ||
| tests_scanned | Yes | Tests read and counted (at most 5000). | |
| insights_error | No | ||
| tests_in_range | Yes | Tests the API holds for the range. | |
| tests_with_insights | Yes |