<!--
{
  "availability" : [

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

# assertForOverFulfill

Indicates that an assertion should be triggered during testing if the expectation is over-fulfilled.

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

## Discussion

When <doc://com.apple.documentation/documentation/Swift/true>, a call to [`fulfill()`](/documentation/XCTest/XCTestExpectation/fulfill()) made after the expectation has already been fulfilled (exceeding [`expectedFulfillmentCount`](/documentation/XCTest/XCTestExpectation/expectedFulfillmentCount)) will trigger an assertion. When <doc://com.apple.documentation/documentation/Swift/false>, a call to [`fulfill()`](/documentation/XCTest/XCTestExpectation/fulfill()) after the expectation has already been fulfilled will have no effect.

The [`assertForOverFulfill`](/documentation/XCTest/XCTestExpectation/assertForOverFulfill) property is set to <doc://com.apple.documentation/documentation/Swift/false> by default for expectations created directly from initializers on [`XCTestExpectation`](/documentation/XCTest/XCTestExpectation) and its subclasses.

The [`assertForOverFulfill`](/documentation/XCTest/XCTestExpectation/assertForOverFulfill) property is set to <doc://com.apple.documentation/documentation/Swift/true> by default for expectations created with the following [`XCTestCase`](/documentation/XCTest/XCTestCase) convenience methods:

- [`expectation(description:)`](/documentation/XCTest/XCTestCase/expectation(description:))
- [`expectation(for:evaluatedWith:handler:)`](/documentation/XCTest/XCTestCase/expectation(for:evaluatedWith:handler:))
- [`expectation(forNotification:object:handler:)`](/documentation/XCTest/XCTestCase/expectation(forNotification:object:handler:))
- [`keyValueObservingExpectation(for:keyPath:expectedValue:)`](/documentation/XCTest/XCTestCase/keyValueObservingExpectation(for:keyPath:expectedValue:))
- [`keyValueObservingExpectation(for:keyPath:handler:)`](/documentation/XCTest/XCTestCase/keyValueObservingExpectation(for:keyPath:handler:))

---

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)