<!--
{
  "availability" : [

  ],
  "documentType" : "symbol",
  "framework" : "XCTest",
  "identifier" : "/documentation/XCTest/XCTIssue-swift.struct/isFailure",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "XCTest"
    ],
    "preciseIdentifier" : "s:6XCTest8XCTIssueV9isFailureSbvp"
  },
  "title" : "isFailure"
}
-->

# isFailure

Whether or not this issue should cause the test it’s associated with to be
considered a failure.

```
var isFailure: Bool { get }
```

## Discussion

The value of this property is `YES` for issues which have a severity level of
`.error` or higher.
Otherwise, the value of this property is `NO`.

Use this property to determine if an issue should be considered a failure, instead of
directly comparing the value of the [`severity`](/documentation/XCTest/XCTIssue-swift.struct/severity-swift.property) property.

---

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)