Instance Method

addTestObserver:

Registers an object conforming to XCTestObservation as an observer for the current test session.

Declaration

- (void)addTestObserver:(id<XCTestObservation>)testObserver;

Discussion

Observers may be added at any time, but will not receive events that occurred before they were registered. The observation center maintains a strong reference to observers.Events may be delivered to observers in any order. Given observers A and B, A may be notified of a test failure before or after B. Any ordering dependencies or serialization requirements must be managed by clients.

See Also

Managing Observers

- removeTestObserver:

Unregisters an object conforming to XCTestObservation as an observer for the current test session.