I'm new to subclassing XCTestCase on multiple levels, but was curious to trying it out since it could potentially save me lots of time rewriting tests, so I set up a simple hierarchy of classes in my testing target:
BaseSpriteNodeTests : XCTestCase
-> CharacterTests : BaseSpriteNodeTests
-> -> EnemyTests : CharacterTests
-> -> PlayerTests : CharacterTests
I gave BaseSpriteNodeTests
two simple test methods: testCreation
and testDestroy
, to see the how inheritance is handled inside test targets.
When I Cmd+U
all the tests, the console output is expected. (4 total classes, two methods each, 8 tests total)
Test Suite 'All tests' passed at 2015-09-21 09:43:46.396.
Executed 8 tests, with 0 failures (0 unexpected) in 0.217 (0.225) seconds
However, the Test Navigator is only showing 7 tests:
Is this a bug in Xcode, or am I missing something crucial about subclassing XCTestCase subclasses?