---
title: Test Parallelization
description: >-
  Reduce CI testing time by distributing test files across CI nodes or workers
  with Test Optimization data.
breadcrumbs: Docs > Test Optimization in Datadog > Test Parallelization
---

# Test Parallelization

{% callout %}
# Important note for users on the following Datadog sites: app.ddog-gov.com, us2.ddog-gov.com

{% alert level="danger" %}
This product is not supported for your selected [Datadog site](https://docs.datadoghq.com/getting_started/site.md). ({% placeholder "user-datadog-site-name" /%}).
{% /alert %}

{% /callout %}

{% callout %}
# Important note for users on the following Datadog sites: app.datadoghq.com, us3.datadoghq.com, us5.datadoghq.com, app.datadoghq.eu, ap1.datadoghq.com, ap2.datadoghq.com

{% callout %}
##### Join the Preview!

Test Parallelization is in Preview. Complete the form to request access.

[Request Access](https://www.datadoghq.com/product-preview/test-parallelization/)
{% /callout %}

{% /callout %}

## Overview{% #overview %}

Test Parallelization helps you reduce CI testing time by distributing test files across CI nodes or local workers. It uses Test Optimization data to detect which test files should run, estimate their duration, and create an execution plan.

Test Parallelization is designed to work with [Test Impact Analysis](https://docs.datadoghq.com/tests/test_impact_analysis.md). Test Impact Analysis skips tests that are not affected by a code change. Test Parallelization splits the remaining test files evenly across the selected CI nodes.

Use Test Parallelization when your test suite takes a long time to run. When used with Test Impact Analysis, Test Parallelization runs only files with non-skipped tests. It also helps reduce CI costs by choosing only as many CI nodes as needed, which can lower total CPU minutes.

## Setup{% #setup %}

Before setting up Test Parallelization, set up [Test Optimization](https://docs.datadoghq.com/tests/setup.md). Optionally, also set up [Test Impact Analysis](https://docs.datadoghq.com/tests/test_impact_analysis.md) if you plan to use it with Test Parallelization. Then follow [Set Up Test Parallelization](https://docs.datadoghq.com/tests/test_parallelization/setup.md) to install `ddtest` and configure your CI provider.

## Compatibility{% #compatibility %}

Test Parallelization is supported for the following language and frameworks:

| Language | Frameworks      |
| -------- | --------------- |
| Ruby     | RSpec, Minitest |

Ruby projects require the `datadog-ci` gem version `1.31.0` or later.

## How it works{% #how-it-works %}

Test Parallelization uses the `ddtest` CLI to plan and run tests:

1. Run `ddtest plan` once to create a reusable `.testoptimization/` plan.
1. Share the `.testoptimization/` directory with each CI job that runs tests.
1. Run `ddtest run --ci-node <CI_NODE_INDEX>` in each CI job to execute only the files assigned to that CI node.

For single-node and multi-node examples, see [Set Up Test Parallelization](https://docs.datadoghq.com/tests/test_parallelization/setup.md).

## Next steps{% #next-steps %}

- [Set up Test Parallelization](https://docs.datadoghq.com/tests/test_parallelization/setup.md)
- [Configure Test Parallelization](https://docs.datadoghq.com/tests/test_parallelization/configuration.md)
- [Best Practices for Test Parallelization](https://docs.datadoghq.com/tests/test_parallelization/best_practices.md)
- [Troubleshooting Test Parallelization](https://docs.datadoghq.com/tests/test_parallelization/troubleshooting.md)
 