---
title: XCTKVOExpectation
framework: xctest
role: symbol
role_heading: Class
path: xctest/xctkvoexpectation
---

# XCTKVOExpectation

An expectation that a specific key-value observing (KVO) condition fulfills.

## Declaration

```swift
class XCTKVOExpectation
```

## Overview

Overview Apple discourages the use of this symbol in Swift. Use XCTKeyPathExpectation instead.

## Topics

### Creating KVO expectations

- [init(keyPath:object:)](xctest/xctkvoexpectation/init(keypath:object:).md)
- [init(keyPath:object:expectedValue:)](xctest/xctkvoexpectation/init(keypath:object:expectedvalue:).md)
- [init(keyPath:object:expectedValue:options:)](xctest/xctkvoexpectation/init(keypath:object:expectedvalue:options:).md)

### Expectation properties

- [keyPath](xctest/xctkvoexpectation/keypath.md)
- [observedObject](xctest/xctkvoexpectation/observedobject.md)
- [expectedValue](xctest/xctkvoexpectation/expectedvalue.md)
- [options](xctest/xctkvoexpectation/options.md)

### Custom KVO evaluation

- [handler](xctest/xctkvoexpectation/handler-swift.property.md)
- [XCTKVOExpectation.Handler](xctest/xctkvoexpectation/handler-swift.typealias.md)

## Relationships

### Inherits From

- [XCTestExpectation](xctest/xctestexpectation.md)

### Conforms To

- [CVarArg](swift/cvararg.md)
- [CustomDebugStringConvertible](swift/customdebugstringconvertible.md)
- [CustomStringConvertible](swift/customstringconvertible.md)
- [Equatable](swift/equatable.md)
- [Hashable](swift/hashable.md)
- [NSObjectProtocol](objectivec/nsobjectprotocol.md)
- [Sendable](swift/sendable.md)
- [SendableMetatype](swift/sendablemetatype.md)

## See Also

### Key Value Observing Expectations

- [XCTKeyPathExpectation](xctest/xctkeypathexpectation.md)
