---
title: "init(test:)"
framework: xctest
role: symbol
role_heading: Initializer
path: "xctest/xctestrun/init(test:)"
---

# init(test:)

Creates a new test run for the provided test.

## Declaration

```swift
init(test: XCTest)
```

## Parameters

- `test`: An doc://com.apple.xctest/documentation/XCTest/XCTest instance.

## Return Value

Return Value A test run for the provided test.
