<!--
{
  "availability" : [

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

# continueAfterFailure

A Boolean value that indicates whether a test method should continue running after a failure occurs.

```
var continueAfterFailure: Bool { get set }
```

## Discussion

The default is <doc://com.apple.documentation/documentation/Swift/true>. Set this property to <doc://com.apple.documentation/documentation/Swift/false> within a test method to end execution of that method as soon as a failure occurs. Other test methods in the suite may still execute after a test fails.

---

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)