---
title: Test Parallelization Troubleshooting
description: >-
  Troubleshoot Test Parallelization plan artifacts, CI node selection, skippable
  tests, and custom commands.
breadcrumbs: >-
  Docs > Test Optimization in Datadog > Test Parallelization > Test
  Parallelization Troubleshooting
---

# Test Parallelization Troubleshooting

{% 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 %}

## Missing or invalid plan artifacts{% #missing-or-invalid-plan-artifacts %}

If `ddtest run --ci-node <N>` cannot find assigned test files, confirm that the `.testoptimization/` directory from the planning job is available in the test job.

The test job must have access to:

- `.testoptimization/manifest.txt`
- `.testoptimization/runner/parallel-runners.txt`
- `.testoptimization/runner/tests-split/runner-N`

When using GitHub Actions, upload `.testoptimization/` with `include-hidden-files: true`; otherwise, the artifact upload can omit the hidden directory.

## Unexpected CI node or worker count{% #unexpected-ci-node-or-worker-count %}

If `ddtest` selects more or fewer CI nodes than expected, review these settings:

- `--min-parallelism`: Minimum CI node or worker count considered by `ddtest`.
- `--max-parallelism`: Maximum CI node or worker count considered by `ddtest`.
- `--ci-job-overhead`: Estimated overhead for launching an additional CI node.

Increase `--ci-job-overhead` to prefer fewer CI nodes. Decrease it to prefer faster wall-clock time.

## No skippable tests are applied{% #no-skippable-tests-are-applied %}

If Test Impact Analysis does not skip tests before Test Parallelization runs, check that:

- Test Impact Analysis is enabled for the test service.
- The `git` executable is present, and you run `ddtest` in a Git repository with a `.git` folder.
- The job that runs `ddtest plan` and the job that runs tests use the same `DD_SERVICE` value.
- `ddtest plan` runs on the same OS and language runtime as your tests.

For more information, see [Test Impact Analysis troubleshooting](https://docs.datadoghq.com/tests/test_impact_analysis/troubleshooting.md).

## Minitest does not run the selected files{% #minitest-does-not-run-the-selected-files %}

For non-Rails Minitest projects, `ddtest` uses `bundle exec rake test` and passes the selected files in the `TEST_FILES` environment variable. Your `Rake::TestTask` must read `TEST_FILES`:

```ruby
Rake::TestTask.new(:test) do |test|
  test.test_files = ENV["TEST_FILES"] ? ENV["TEST_FILES"].split : ["test/**/*.rb"]
end
```

## Custom commands do not run the expected files{% #custom-commands-do-not-run-the-expected-files %}

When using `--command`, do not include test files or the `--` separator in the command. `ddtest` appends the selected test files itself.

Incorrect:

```bash
bin/ddtest run --command "bundle exec rspec -- spec/models/"
```

Correct:

```bash
bin/ddtest run --platform ruby --framework rspec --command "bundle exec rspec"
```

## Further reading{% #further-reading %}

- [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)
- [Troubleshooting Test Optimization](https://docs.datadoghq.com/tests/troubleshooting.md)
