<!--
{
  "availability" : [

  ],
  "documentType" : "symbol",
  "framework" : "XCTest",
  "identifier" : "/documentation/XCTest/XCTestObservation/testSuite(_:didRecord:)-3rk9k",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "XCTest"
    ],
    "preciseIdentifier" : "c:objc(pl)XCTestObservation(im)testSuite:didRecordIssue:"
  },
  "title" : "testSuite(_:didRecord:)"
}
-->

# testSuite(_:didRecord:)

Notifies the observer when a test suite reports an issue.

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

```
optional func testSuite(_ testSuite: XCTestSuite, didRecord issue: XCTIssue)
```

macOS:

```
optional func testSuite(_ testSuite: XCTestSuite, didRecord issue: XCTIssueReference)
```

## Parameters

`testSuite`

The test suite with the issue.

`issue`

The issue to record.

---

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)