---
title: keyPath
framework: xctest
role: symbol
role_heading: Instance Property
path: xctest/xctkeypathexpectation/keypath
---

# keyPath

The key path for the observed property, relative to the observed object.

## Declaration

```swift
final let keyPath: KeyPath<T, V>
```

## See Also

### Expectation properties

- [observedObject](xctest/xctkeypathexpectation/observedobject.md)
- [options](xctest/xctkeypathexpectation/options.md)
- [expectedValue](xctest/xctkeypathexpectation/expectedvalue.md)
