<!--
{
  "availability" : [
    "Swift: 6.2.0 -",
    "Xcode: 26.0.0 -",
    "macOS: -",
    "swift: 6.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Testing",
  "identifier" : "/documentation/Testing/ExitTest/Condition/failure",
  "metadataVersion" : "0.1.0",
  "role" : "Type Property",
  "symbol" : {
    "kind" : "Type Property",
    "modules" : [
      "Swift Testing",
      "Testing"
    ],
    "preciseIdentifier" : "s:7Testing8ExitTestV9ConditionV7failureAEvpZ"
  },
  "title" : "failure"
}
-->

# failure

A condition that matches when a process exits abnormally

```
static var failure: ExitTest.Condition { get }
```

## Discussion

This condition matches any exit code other than `EXIT_SUCCESS` or any
signal that causes the process to exit.

---

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)