<!--
{
  "availability" : [

  ],
  "documentType" : "symbol",
  "framework" : "XCTest",
  "identifier" : "/documentation/XCTest/XCTestRun/record(_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "XCTest"
    ],
    "preciseIdentifier" : "c:objc(cs)XCTestRun(im)recordIssue:"
  },
  "title" : "record(_:)"
}
-->

# record(_:)

Records an issue during test execution for the test run.

iOS, iPadOS, Mac Catalyst, tvOS, visionOS, watchOS:

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

macOS:

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

## Parameters

`issue`

The test issue to record.

## 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.

---

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)