<!--
{
  "availability" : [

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

# fulfill()

Marks the expectation as having been met.

```
func fulfill()
```

## Discussion

It is an error to call this method on an expectation that has already been fulfilled, or when the test case that vended the expectation has already completed.

---

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)