<!--
{
  "availability" : [

  ],
  "documentType" : "symbol",
  "framework" : "XCTest",
  "identifier" : "/documentation/XCTest/XCTestSuite",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "XCTest"
    ],
    "preciseIdentifier" : "c:objc(cs)XCTestSuite"
  },
  "title" : "XCTestSuite"
}
-->

# XCTestSuite

A collection of test cases to manage as a test suite.

```
class XCTestSuite
```

## Overview

Typically, Xcode automatically manages test suites for you. Only use [`XCTestSuite`](/documentation/XCTest/XCTestSuite) if you need to define your own custom test suites programmatically.

## Topics

### Creating Test Suites

[`defaultTestSuite`](/documentation/XCTest/XCTestSuite/default)

Creates a suite of test suites that represents all test case methods in the current runtime.

[`-  initWithName:`](/documentation/XCTest/XCTestSuite/init(name:))

Creates a test suite with the specified name.

[`+  testSuiteWithName:`](/documentation/XCTest/XCTestSuite/testSuiteWithName:)

Creates a test suite with the specified name.

[`+  testSuiteForBundlePath:`](/documentation/XCTest/XCTestSuite/init(forBundlePath:))

Creates a test suite with the bundle at the specified path.

[`+  testSuiteForTestCaseClass:`](/documentation/XCTest/XCTestSuite/init(forTestCaseClass:))

Creates a test suite that contains all test methods in the specified class.

[`+  testSuiteForTestCaseWithName:`](/documentation/XCTest/XCTestSuite/init(forTestCaseWithName:))

Creates a test suite that contains a test case with the specified name.

### Managing Tests

[`-  addTest:`](/documentation/XCTest/XCTestSuite/addTest(_:))

Adds a test to the test suite.

[`tests`](/documentation/XCTest/XCTestSuite/tests)

All tests currently in the test suite.

## Relationships

### Conforms To

[`NSObjectProtocol`](/documentation/ObjectiveC/NSObjectProtocol)

[`Hashable`](/documentation/Swift/Hashable)

[`CustomDebugStringConvertible`](/documentation/Swift/CustomDebugStringConvertible)

[`CustomStringConvertible`](/documentation/Swift/CustomStringConvertible)

[`Equatable`](/documentation/Swift/Equatable)

[`CVarArg`](/documentation/Swift/CVarArg)

### Inherits From

[`XCTest`](/documentation/XCTest/XCTest)

---

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)