[Xcode 10.1] Test_XCTestObservation unit tests right inside XCTest.framework

I have a code that walks the objC runtime and finds all `XCTestCase` subclasses. I use it to filter test cases I'd like to run on PR.


In Xcode 9/10, it listed only test classes of my project, worked like a charm.


In Xcode 10.1, it started to provide the following classes that apparently are part of XCTest framework that is gets bundled with -Runner.app:


- `Test_XCTestObservation`

- `Test_XCTestObservationCenter`


Is this a test code that got leaked into production. Or are these classes present on purpose? Hopper shows there is `tearDown` method, some `test...` methods, so it does look to me like it is a test code.

Replies

Is this a test code that got leaked into production.

I don’t know, but based on the evidence you’ve posted I think it makes sense for you to file a bug about this so that the XCTest team can take a proper look.

Please post your bug number, just for the record.

Share and Enjoy

Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardware

let myEmail = "eskimo" + "1" + "@apple.com"