# Test Sharding {#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](https://en.wikipedia.org/wiki/Bin_packing_problem), so each runner finishes at roughly the same time. Results from all shards are automatically aggregated in <.localized_link href="/guides/features/test-insights">Test Insights</.localized_link>, giving you a single unified view of your test suite across all shards.

<.home_cards>
  <.home_card
    title="Xcode"
    details="Shard Xcode tests across parallel CI runners."
    link="/guides/features/test-sharding/xcode"
/>
  <.home_card
    title="Generated projects"
    details="Shard tests in Tuist generated projects across parallel CI runners."
    link="/guides/features/test-sharding/generated-projects"
/>
  <.home_card
    title="Gradle"
    details="Shard Gradle tests across parallel CI runners."
    link="/guides/features/test-sharding/gradle"
/>
</.home_cards>

> [!WARNING]
> **Requirements**
>
> - A <.localized_link href="/guides/server/accounts-and-projects">Tuist account and project</.localized_link>
> - <.localized_link href="/guides/features/test-insights">Test Insights</.localized_link> configured (for optimal shard balancing based on historical timing data)

