Test Sharding
Modern CI hosts offer multi-core environments that allow some degree of test parallelization. However, there are scenarios where you need to go beyond what a single host can offer — for example, when you're limited by the number of simulators you can run simultaneously, or when your test suite simply outgrows a single machine.
In those cases, you need a system that distributes tests across multiple CI runners and aggregates the results back into a unified view. That's what test sharding does.
Tuist uses historical test timing data to intelligently balance the load across shards using a bin-packing algorithm, so each runner finishes at roughly the same time. Results from all shards are automatically aggregated in Test Insights, giving you a single unified view of your test suite across all shards.
Shard Xcode tests across parallel CI runners.
Shard tests in Tuist generated projects across parallel CI runners.
Shard Gradle tests across parallel CI runners.
- A Tuist account and project
- Test Insights configured (for optimal shard balancing based on historical timing data)