Test sharding planner
Paste your slowest test files with their durations, choose how many parallel shards you want, and get a balanced split with the expected wall-clock time.
- Expected wall time
- 9m 8s
- serial: 31m 33s
- Speedup
- 3.45x
- Balance
- 98%
- 100% is perfect
| Shard | Tests | Test time | With setup | Contents |
|---|---|---|---|---|
| 1 | 3 | 7m 32s | 9m 2s | search/index.test.ts, auth/login.test.ts, api/users.test.ts |
| 2 | 3 | 7m 24s | 8m 54s | e2e/smoke.test.ts, billing/refund.test.ts, billing/tax.test.ts |
| 3 | 4 | 7m 38s | 9m 8s | billing/invoice.test.ts, ui/dashboard.test.ts, api/webhooks.test.ts, ui/settings.test.ts |
| 4 | 4 | 7m 29s | 8m 59s | ui/checkout.test.ts, api/orders.test.ts, search/query.test.ts, auth/session.test.ts |
Everything runs in your browser; nothing you type is sent anywhere.
How to use it
- Paste one test per line as name and seconds. Most test runners can print per-file timings.
- Set the number of shards and the fixed overhead each shard pays for checkout, install and warm-up.
- Use the shard lists to configure your matrix, then compare the expected wall time with your current run.
Frequently asked questions
How are shards balanced?
With the longest-processing-time-first rule: sort tests from longest to shortest and always add the next one to the least loaded shard. It is simple and within a third of optimal in the worst case.
Why doesn't doubling shards halve the time?
Every shard repeats the fixed setup (checkout, install, build), and a single long test caps how short any shard can be.
What does sharding do to my bill?
You pay for every shard's setup, so minutes go up even though wall time goes down. Use the overhead field to see the trade-off.
How do I shard in Jest, Playwright or pytest?
Jest and Playwright have --shard=i/n, and pytest has plugins like pytest-split. Use this plan if you need duration-aware splits rather than count-based ones.
Related tools
- GitHub Actions matrix expanderSee every job a GitHub Actions strategy.matrix creates, with include and exclude applied, and the total job count against the 256-job limit.
- CI minutes forecasterForecast monthly CI minutes and GitHub Actions cost from pull requests per day, pushes per PR, jobs per run and minutes per job. Plan and runner aware.
- Cost of slow CI calculatorWork out what slow CI costs your team each year from engineers, waits per day, minutes per wait and hourly cost, plus the saving from faster builds.
- GitHub Actions cache key builderBuild a correct actions/cache key with hashFiles patterns and restore-keys for npm, pnpm, pip, Gradle, Maven, Go, Cargo and more. Copy-ready YAML.