Skip to content

In development. Expect rough edges and changes. The source code is not public yet.

Docker 8 min read Opinion mediumAdept

Achieving Test Reliability for Native E2E Testing: Beyond Fixing Broken Tests

Patching flaky native E2E tests one by one failed to improve reliability over more than a year. Historical failure analysis showed much of the noise came from unstable environments and shared test account state. The fix was infrastructure: isolated pre-prod or ephemeral environments, standardized containerized emulators, fresh test accounts per session, and mocked feature-flag and A/B responses. On the process side it recommends feature-based test ownership with a single point of contact per flow, remotely muting known-flaky tests, enriched alerts and tracked flakiness trends, plus a hybrid setup running Dockerized Android emulators on PRs and real device farms periodically.

Related posts

  • How we raised mobile end-to-end test stability to 98%

    Shopify Engineering mediumAdept

    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. The wrapper exposes a small builder-style API where every action must carry an assertion that is validated as false before the step and true after. Escape hatches like custom timeouts and Test IDs are prefixed UNSAFE_. Elements are located visually rather than through the view hierarchy: PaddleOCR finds text, and OpenCV matches grayscale Polaris SVG icons, including color-inverted variants and multiple sizes, using adjacency to tell duplicates apart. Annotated run videos, a single CLI for local and remote device-farm runs, and a pre-promotion gate that reruns new tests before admitting them to CI round out the approach.

  • Handling Flaky Tests at Scale: Auto Detection & Suppression

    Slack Engineering mediumAdept

    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.

  • Mobile Developer Experience at Slack

    Slack Engineering mediumAdept

    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. On Android, test sharding (in-house Fuel, later Flank) cut runs from 50+ minutes to under 20, and replacing Calabash with Espresso took suites from ~350 to ~60 minutes. Further gains came from auto-suppressing flaky tests (failure rate 57% to 4%), migrating from Jenkins to Buildkite (CI stability ~87% to 95%, TTM down 41%), generating Xcode projects with Xcodegen to avoid merge conflicts, and adopting a merge queue.

  • How we rebuilt the Shopify app in 12 weeks

    Shopify Engineering mediumAdept

    Thirty engineers rebuilt the 300+ screen Shopify mobile app from React Native to native Swift and Kotlin in 12 weeks, with agents writing most of the code. The key work was building a system around the agents: a shared Reflex architecture for iOS and Android that lets ViewModels run headless from a CLI in milliseconds, CI checks that fail on cross-platform drift, and Helix verifying small checkpoints against the legacy app, which served as the spec instead of written documents. As code generation got faster, the bottlenecks moved to laptops, code review, merging and coordination. Shopify answered with remote dev environments, agent-first adversarial review on small dual-platform PRs, a daily loop that turns review comments into rules, agent-driven merge queues, and pod ownership by product area. Launch time dropped about 50% on Android and 14% on iOS, and the Android binary shrank by 40%.

  • Autonomous testing of services at scale

    Meta Engineering mediumAdept

    Meta built an integration testing framework for back-end services that reuses production containerization and routing to spin up ephemeral test environments, with per-service boundaries where requests go to local services, in-process Python mocks, in-memory replicas, production (read-only) or are blocked. An autonomous extension mirrors a service's Twine production spec, isolates it via application-level RPC filtering plus an LD_PRELOAD layer intercepting libc connect/sendto/sendmsg, and routes unknown RPCs to a universal mock, letting one-third of services run safely with no human setup. Thrift's reflective IDL lets it auto-generate fuzz harnesses and dependency mocks, and mutating sanitized recorded production requests helps fuzzing reach deep code paths past input validation.

The quest for software engineering knowledge.

Look:
Layout: