<!--
{
  "availability" : [

  ],
  "documentType" : "symbol",
  "framework" : "XCTest",
  "identifier" : "/documentation/XCTest/XCTestCaseRun",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "XCTest"
    ],
    "preciseIdentifier" : "c:objc(cs)XCTestCaseRun"
  },
  "title" : "XCTestCaseRun"
}
-->

# XCTestCaseRun

An object that collects information about a specific execution of a test case.

```
class XCTestCaseRun
```

## Overview

The test runner manages the creation and tracking of `XCTestCaseRun` for each [`XCTestCase`](/documentation/XCTest/XCTestCase) in an [`XCTestSuite`](/documentation/XCTest/XCTestSuite).

## Topics

### Deprecated

[`-  recordFailureInTest:withDescription:inFile:atLine:expected:`](/documentation/XCTest/XCTestCaseRun/recordFailure(inTest:withDescription:inFile:atLine:expected:))

Records a test failure during test execution for this test run.

## Relationships

### Conforms To

[`NSObjectProtocol`](/documentation/ObjectiveC/NSObjectProtocol)

[`CustomStringConvertible`](/documentation/Swift/CustomStringConvertible)

[`Hashable`](/documentation/Swift/Hashable)

[`CVarArg`](/documentation/Swift/CVarArg)

[`Equatable`](/documentation/Swift/Equatable)

[`CustomDebugStringConvertible`](/documentation/Swift/CustomDebugStringConvertible)

### Inherits From

[`XCTestRun`](/documentation/XCTest/XCTestRun)

---

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)