Detect, quarantine, and eliminate flaky tests from your codebase
Trunk Flaky Tests lets your teams detect, track, quarantine, and fix flaky tests in your codebase. Trunk can also identify broken tests — tests failing consistently at a high rate that indicate real regressions needing immediate fixes, not just quarantining. Flaky Tests is language, environment, and framework-agnostic.Tests are organized into test collections — named groups, each with its own detection, quarantining and ticketing settings. New organizations start on collections; organizations already using Flaky Tests by repository migrate to them gradually.Let’s explore how Trunk Flaky Tests’ features help you tackle flaky tests. If you can’t wait to try Trunk, follow our getting started guide.You can see an overview of Trunk Flaky Tests in this video.
Your dashboard shows a comprehensive overview of your test suite’s health at a glance. It lets you see important impact metrics like the number of flaky tests, PRs impacted by flaky tests, and PRs rescued by quarantining flaky tests.
Key metrics for a collection or repository
The dashboard’s top-ten tables, such as Top 10 Most Unstable Tests, have a Last Seen column. It is the time of the test’s most recent run, skipped runs excluded, shown relative to now (for example, “2 hours ago”); hover over it for the exact time. To find that run, open the test and go to its Test History tab: it is the newest run there that is not skipped.To learn more, see how Flaky Tests does detection.
You can find a list of known flaky tests complete with important information like their impact on PRs and if someone’s working on a fix. For more granularity, you can also inspect individual tests for their execution history, results, and status changes.
Press ⌘K (macOS) or CtrlK (Windows and Linux) anywhere in the Trunk app to open the command palette. Start typing to jump to Merge Queue, Flaky Tests, your account settings, or any connected repository by name.
Flaky Tests allows you to quarantine detected flaky tests, stopping them from failing your CI jobs. This prevents failed flaky tests from impacting your CI pipelines, so you won’t have to disable tests and won’t be slowed down by flaky CI jobs.
flaky tests can be quarantined automatically or manually
Trunk enables the automation of quickly creating and assigning tickets through integrations with platforms like Jira and Linear, as well as custom workflows with webhooks. The status of tickets created will be reflected in real-time in the Trunk web app. This helps you track efforts to fix high-impact, flaky tests.To learn more, learn about our ticketing integrations.