get_flaky_tests
Identify unreliable tests with high flip rates between pass and fail states to prioritize investigation and improve test stability.
Instructions
Get the list of flaky tests in a project.
When using a user API Key (gaf_), you must provide a projectId. Use list_projects first to find available project IDs.
A test is considered flaky if it frequently switches between pass and fail states (high "flip rate"). This helps identify unreliable tests that need attention.
Returns:
List of flaky tests with:
name: Test name
flipRate: How often the test flips between pass/fail (0-1)
flipCount: Number of status transitions
totalRuns: Total test executions analyzed
lastSeen: When the test last ran
Summary with threshold used and total count
Use this after get_project_health shows flaky tests exist, to identify which specific tests are flaky and need investigation.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| projectId | No | Project ID to get flaky tests for. Required when using a user API Key (gaf_). Use list_projects to find project IDs. | |
| threshold | No | Minimum flip rate to be considered flaky (0-1, default: 0.1 = 10%) | |
| limit | No | Maximum number of flaky tests to return (default: 50) | |
| days | No | Analysis period in days (default: 30) |