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

# record(_:)

Records an issue during test execution.

## Declaration

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

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

## Parameters

- `issue`: The test issue to record.

## See Also

### Creating Tests Programmatically

- [init(invocation:)](xctest/xctestcase/init(invocation:).md)
- [init(selector:)](xctest/xctestcase/init(selector:).md)
- [testInvocations](xctest/xctestcase/testinvocations.md)
- [invocation](xctest/xctestcase/invocation.md)
- [invokeTest()](xctest/xctestcase/invoketest().md)
- [recordFailure(withDescription:inFile:atLine:expected:)](xctest/xctestcase/recordfailure(withdescription:infile:atline:expected:).md)
- [defaultTestSuite](xctest/xctestcase/defaulttestsuite.md)
