---
title: "Handling Flaky Tests at Scale: Auto Detection & Suppression"
description: "Slack's mobile DevXp team cut CI test job failures from 57% of failing builds to under 5% by automating flaky test detection and suppression across 27,000+ iOS and Android tests."
url: "https://swe.quest/articles/handling-flaky-tests-at-scale-auto-detection-suppression-77980e444545e1fa"
canonical: "https://slack.engineering/handling-flaky-tests-at-scale-auto-detection-suppression/"
source: "Slack Engineering"
published: "2022-04-05"
difficulty: "medium"
kind: "Case study"
reading_minutes: 14
tags: ["testing","ci-cd","mobile","developer-productivity"]
---

# Handling Flaky Tests at Scale: Auto Detection & Suppression

A post on [Slack Engineering](https://swe.quest/sources/slack.md), published 2022-04-05, 14 min read, Case study. Original: [https://slack.engineering/handling-flaky-tests-at-scale-auto-detection-suppression/](https://slack.engineering/handling-flaky-tests-at-scale-auto-detection-suppression/)

## Summary

Slack's mobile DevXp team cut CI test job failures from 57% of failing builds to under 5% by automating flaky test detection and suppression across 27,000+ iOS and Android tests. A first approach filtered flaky results using a per-test failure threshold over recent main-branch history, and it quickly raised build stability. It was rolled back because broken new tests and failed fixes leaked into main, and CI depended on a backend. The second approach suppresses test execution on the main branch only. It detects failures (excluding infra, crash and API failures), maps each test to an owning team, files a Jira ticket, then opens and auto-merges a PR that disables the test.

Written by swe.quest, not by the author.

**Difficulty:** Medium: assumes a working developer; shows how it is built or done

## Topics

- [Testing](https://swe.quest/tags/testing.md) (Engineering practices)
- [CI/CD](https://swe.quest/tags/ci-cd.md) (Reliability & operations)
- [Mobile](https://swe.quest/tags/mobile.md) (Web & mobile)
- [Developer productivity](https://swe.quest/tags/developer-productivity.md) (Engineering practices)

## Prerequisites

- CI pipelines ([easy posts on CI/CD](https://swe.quest/tags/ci-cd.md?difficulty=easy))
- automated testing basics ([easy posts on Testing](https://swe.quest/tags/testing.md?difficulty=easy))

## Keywords

Project Cornflake, Firebase Test Lab, Jira, GitHub

## Related posts

- [Balancing Safety and Velocity in CI/CD at Slack](https://swe.quest/articles/balancing-safety-and-velocity-in-ci-cd-at-slack-cd559ba9ba4be498.md): Slack Engineering · 2022-02-18 · Medium · 12 min read · CI/CD, Testing, Developer productivity, Deployment
  Slack restructured CI for its Webapp monorepo from mostly pre-merge end-to-end testing into three tiers: a small pre-merge set (\<1% of e2e tests) that blocks merges, a post-merge set (\<10%) that blocks deploys, and a bi-hourly batched regression pipeline for low-criticality features.
- [Mobile Developer Experience at Slack](https://swe.quest/articles/mobile-developer-experience-at-slack-f2b2b79d74a881fd.md): Slack Engineering · 2022-10-12 · Medium · 14 min read · Developer productivity, Mobile, CI/CD, Testing, Build systems
  A dedicated mobile Developer Experience team grew from 3 to 8 engineers and cut CI feedback time and failure rates by targeting the pain points that surveys, NPS and metrics like time to merge showed hurt developers most. iOS test time fell from about 50 minutes to an average of 9 by moving from Xcodebuild to Bazel with disk caching and bazel-diff, so only affected targets are tested.
- [How GitHub reduced testing time for iOS apps with new runner features](https://swe.quest/articles/how-github-reduced-testing-time-for-ios-apps-with-new-runner-features-6d60c9cbd2f8be42.md): GitHub Engineering · 2024-06-03 · Medium · 4 min read · CI/CD, Mobile, Performance engineering, Developer productivity
  GitHub's iOS team cut CI testing time by 60%, from 38 to 15 minutes, by moving to Apple silicon M1 macOS runners (macos-14-xlarge) and splitting a single monolithic build-and-test job into per-module jobs across roughly 60 first-party modules.
- [How we raised mobile end-to-end test stability to 98%](https://swe.quest/articles/how-we-raised-mobile-end-to-end-test-stability-to-98-ca68fcd3c9f171ff.md): Shopify Engineering · 2026-08-12 · Medium · 6 min read · Testing, Mobile, CI/CD, Computer vision, React
  Shopify rebuilt its mobile end-to-end test framework as an opinionated wrapper over Appium, raising test stability from 50% to 98% and returning the suite to blocking PR checks.
- [App stability at scale with a layered defense](https://swe.quest/articles/app-stability-at-scale-with-a-layered-defense-191103cbbe4ddc1a.md): Grab Engineering · 2026-10-21 · Medium · 15 min read · Mobile, Deployment, Static analysis, Observability, Testing
  Grab keeps its Android and iOS superapp stable with a layered, shift-left defense against crashes.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
