<div dir="ltr">Hello! This is in reference to <a href="https://github.com/apple/swift-corelibs-xctest/pull/3">https://github.com/apple/swift-corelibs-xctest/pull/3</a>. That pull request contains a commit that attempts to refactor XCTest such that it is more &quot;unit-testable&quot;.<br><br>To do so, it gives XCTMain an additional parameter: a list of objects conforming to the Reporter protocol. I think of this as a minimal, corelibs equivalent to Apple&#39;s XCTest&#39;s XCTestObserver.h. I say &quot;minimal&quot; because Reporter only defines Reporter.log(), whereas XCTestObserver has one method for each kind of test event (started, failed, finished, etc.).<br><br>These reporters are, for now, storied in a global array. In the future, I&#39;d like to discuss moving XCTest to a model in which all tests are (optionally) run in sub-processes, each of which may (optionally) run in parallel. This global array most certainly won&#39;t work for such a change, but for now, I simply want to have regression tests on the project. It&#39;s hard to send pull requests without knowing everything still works!<br><br>Besides this approach, which modifies XCTest in order to test it, it may be more prudent to add tests *without* changing XCTest at all. To do so, I could add tests that run programs that call XCTMain(), then verify what&#39;s printed to stdout. This could be done using a Python script (which would go well with the build script, also in Python).<br><br>I&#39;d love input on which of these approaches sounds more viable. Other ideas are also, of course, welcome!<br><br>- Brian Gesiak</div>