<!--
{
  "availability" : [
    "Xcode: 16.0.0 -",
    "iOS: -",
    "iPadOS: -",
    "macCatalyst: -",
    "macOS: -",
    "swift: 6.0.0 -",
    "tvOS: -",
    "visionOS: -",
    "watchOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "Testing",
  "identifier" : "/documentation/Testing/ParallelizationTrait",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "Swift Testing"
    ],
    "preciseIdentifier" : "s:7Testing20ParallelizationTraitV"
  },
  "title" : "ParallelizationTrait"
}
-->

# ParallelizationTrait

A type that defines whether the testing library runs this test serially
or in parallel.

```
struct ParallelizationTrait
```

## Overview

When you add this trait to a parameterized test function, that test runs its
cases serially instead of in parallel. This trait has no effect when you
apply it to a non-parameterized test function.

When you add this trait to a test suite, that suite runs its
contained test functions (including their cases, when parameterized) and
sub-suites serially instead of in parallel. If the sub-suites have children,
they also run serially.

This trait does not affect the execution of a test relative to its peers or
to unrelated tests. This trait has no effect if you disable test
parallelization globally (for example, by passing `--no-parallel` to the
`swift test` command.)

To add this trait to a test, use [`serialized`](/documentation/Testing/Trait/serialized).

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)