Skip to content

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

Shopify Engineering 10 min read Research mediumAdept

Test Budget: Time Constrained CI Feedback

Shopify's Test Infrastructure team evaluated a "test budget" for its 170,000-test Rails monolith: tests chosen by call-graph test selection are reordered with prioritization heuristics so failures surface early, and execution stops at a fixed time limit. Six criteria (failure rate, average duration, churn, coverage, complexity, random) were compared using Time to First Failure, APFD and a Convergence Index. Historical failure rate performed best, finding 80% of failures after running 60% of the selected suite, while churn and complexity were nearly useless. The analysis suggests stopping at under 70% of the test-selection suite would still catch the first failure in most builds.

Assumes: continuous integration pipelinestest selectionbasic statistics (percentiles, boxplots)

Related posts

  • How we prepare Shopify for BFCM

    Shopify Engineering mediumAdept

    Shopify readies for Black Friday Cyber Monday with a year-long program that runs from March to October. It combines capacity planning on Google Cloud, What Could Go Wrong risk assessments, chaos-engineering Game Days on critical journeys like checkout, and a centralized Resiliency Matrix of failure modes, RTOs and runbooks. Five scale tests at forecast and p99 load (up to 200M requests per minute) used the Genghis load generator from three GCP regions, Toxiproxy fault injection and regional failovers. The tests surfaced issues such as checkout queue backups, rate-limit paths in authenticated checkout and slow region rebalancing. The newly rebuilt analytics platform needed more Kafka partitions, API memory optimization, connection-timeout tuning and load-balancer changes before facing its first holiday peak.

  • Performance Testing At Scale—for BFCM and Beyond

    Shopify Engineering mediumAdept

    Shopify prepares for Black Friday Cyber Monday by repeatedly running full-scale load tests against production: scaling Shopify Core and dependencies (nginx routing, ProxySQL, key/value store) to their BFCM profile, layering five Cronograma-driven traffic flows (browse/buy, admin, flash sale, Storefront API, Hydrogen/Oxygen) with an abort switch, then scaling down in reverse order and running blameless retrospectives. Full-scale testing is chosen over scaled-model testing because databases and vertically scaled components don't extrapolate and many failures, such as TCP connection-count exhaustion, appear just from running a larger fleet. Practical workarounds include partially bypassing the CDN to avoid overloading a few PoPs, cache-busting requests to avoid skewed results, and single-region failover tests to verify capacity.

  • Catching Bugs Before They Land: JiTTesting’s Human-on-the-Loop Approach at Full Scale

    Meta Engineering mediumAdept

    Meta has moved Catching Just-in-Time Tests (JiTTests) from research prototype into production: LLMs generate executable tests designed to fail on risky diffs, exposing concrete behavioral changes before code lands rather than reviewing code like a human would. A nightly pipeline targets risky diffs, runs a mutation-guided "dodgy diff" workflow alongside an "intent-aware" workflow that infers a change's intent and risks to build mutants, then filters weak catches with an ensemble LLM-as-Judge plus a deterministic rule-based assessor (RubFake). Engineers are contacted only for highly ranked catches under a human-on-the-loop model, where they set criteria and review outcomes in aggregate. The system has drawn engagement from 589 engineers with a 60% true-positive rate and caught 74 serious privacy bugs at diff time, cutting privacy SEVs by 20% in the first half of 2026.

  • Balancing Safety and Velocity in CI/CD at Slack

    Slack Engineering mediumAdept

    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. The move was driven by the arithmetic of flakiness: even a 1% per-suite flake rate across 60+ suites meant most PRs hit a flaky failure. Consecutive-failure alerts based on a state machine, per-business-area triage channels with test ownership, and a Slack bot that spins up escalation channels with the right liaisons kept the change safe. Afterwards p95 test turnaround fell over 40% to under 18 minutes, per-PR flakiness dropped over 90% to under 5%, and customer-reported defects showed no measurable increase.

  • 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.

The quest for software engineering knowledge.

Look:
Layout: