How do you detect and manage flaky tests at scale?
AdvancedProductionMetrics, Performance and Cost
Answer
Collect JUnit results from every run in a store (BigQuery, Datadog CI Visibility, BuildPulse, Trunk), and flag tests that both pass and fail on the same commit or alternate without code changes. Auto-quarantine flaky tests into a non-blocking job with an issue assigned to the owning team and a deadline; track flake rate as a team metric; fix root causes (time dependence, shared state, ordering, un-awaited async, port collisions). Limit retries to one and always record that a retry happened.
More on Metrics, Performance and Cost
How do you measure DORA metrics in practice?IntermediateWhat do the DORA performance levels look like, and how do you use them?IntermediateWhat are common ways DORA metrics get gamed or misread?AdvancedWhich pipeline metrics do you monitor for the CI platform itself?IntermediateHow do you cut CI cost without hurting developer speed?IntermediateHow do you use a remote build cache (Gradle, Bazel, Turborepo, Nx)?Advanced