Skip to main content
InterviewHubPRO
Section Overview
Q46

Question 46 of 50

Part 3: Enterprise Scale, Compliance & Production Hardening (Senior / Staff)

92%
CI/CD & GitHub Actions (50 Qs)•Part 3: Enterprise Scale, Compliance & Production Hardening (Senior / Staff)

Handling Long-Running Tests: Test splitting, parallel test shards, and Flaky Test quarantine strategies.

senior LevelCode ExamplecicdEnterprise Scale

In Simple Words: When integration test suites exceed 30 minutes, developers stop running tests.

  1. Parallel Sharding: Split the test suite across multiple identical parallel runners using GitHub matrix sharding:
    yaml
    strategy:
      matrix:
        shard: [1/4, 2/4, 3/4, 4/4]
    steps:
      - run: npx playwright test --shard=${{ matrix.shard }}
    
  2. Flaky Test Quarantine: Automatically flag non-deterministic tests and execute them in a quarantined non-blocking job to keep main deployment paths green while reporting reliability metrics.