Possible regression: unit tests not found in subclass of a XCTestCase Subclass

Using either Xcode 9.2 or 9.3 with the Swift Development Snapshot from 4/3/18, subclassed unit tests do not run.

I have a base set of tests that need to run in two environments. I placed the tests in a subclass of XCTestCase, and then subclassed the base class twice. Each subclass configures its target environment. With Xcode 9.2, the tests run within each subclass. With 9.3, due to a regression caused by conditional conformance, I have no choice but to use the aforementioned snapshot.

Output from a “failing” run:

Test Suite 'Selected tests' started at 2018-04-05 13:34:00.134
Test Suite 'StellarKitTests.xctest' started at 2018-04-05 13:34:00.135
Test Suite 'StellarKitTests.xctest' passed at 2018-04-05 13:34:00.135.
	 Executed 0 tests, with 0 failures (0 unexpected) in 0.000 (0.000) seconds
Test Suite 'Selected tests' passed at 2018-04-05 13:34:00.136.
	 Executed 0 tests, with 0 failures (0 unexpected) in 0.000 (0.001) seconds

I just stumbled upon the same issue. From 166 tests I have, if I let all my test cases inherit from a custom subclass of XCTestCase, XCode 11.6 reports 0 tests.

Terms of Service

Privacy Policy

Cookie Policy