---
title: "record(_:)"
framework: xctest
role: symbol
role_heading: Instance Method
path: "xctest/xctestrun/record(_:)"
---

# record(_:)

Records an issue during test execution for the test run.

## Declaration

```swift
func record(_ issue: XCTIssue)
```

```swift
func record(_ issue: XCTIssueReference)
```

## Parameters

- `issue`: The test issue to record.

## Discussion

Discussion The test run records a failure or other issue during test execution with this method. Override to customize the issue, and call super unless you want to suppress the issue.

## See Also

### Performing Test Runs

- [start()](xctest/xctestrun/start().md)
- [stop()](xctest/xctestrun/stop().md)
