---
title: failureReason
framework: xctest
role: symbol
role_heading: Instance Property
path: xctest/xctexpectedfailure/failurereason
---

# failureReason

An optional string that describes why the test expects a failure.

## Declaration

```swift
var failureReason: String? { get }
```

## See Also

### Detailing Expected Failure

- [issue](xctest/xctexpectedfailure/issue.md)
