Sharded Tests
- Getting Started complete
- a test runner that supports sharding
- every commit with one merged report on the dashboard, even when the tests ran across N parallel shards.
Sharding is a test-runner feature
Section titled “Sharding is a test-runner feature”Sharding happens in your test runner, not in Flakiness.io. Each runner has its own way to split the test suite across N workers — consult your runner’s documentation:
- Playwright Test — Sharding
- Vitest —
--shardCLI flag - Pytest —
pytest-split(true sharding via--splits N --group K;pytest-xdistparallelizes across workers on a single machine, which is different) - CucumberJS — Sharding
Configure your CI (matrix or parallel jobs) to run each shard in its own job, invoking the runner with the appropriate shard flag. This is standard CI work and follows your provider’s conventions.
How Flakiness.io merges the shards
Section titled “How Flakiness.io merges the shards”Flakiness.io joins shard reports automatically. No platform-side configuration is needed. The match key is:
- same commit SHA, and
- same environment
Each shard produces its own report. When both the commit SHA and the environment match, Flakiness.io merges them into one unified view on the dashboard.
If the environments differ between shards (for example, shards 1–2 on Linux and shards 3–4 on Windows), you’ll get two separate histories, which is usually what you want.
Related
Section titled “Related”- Configuring Environments — deliberately split histories (staging vs prod, etc.).
- Running Tests Across Operating Systems — the OS matrix is a shard-ish pattern where you do want separate histories.