Search code examples
iosxcodexctest

Xcode Test Not Appearing in Test Navigator


I just wrote a new test in my XCTestCase class. The original two default tests run perfectly. But for some reason Xcode isn't detecting the new test I just wrote.

It doesn't appear in the left side Test Navigator and doesn't appear in the Scheme test section.

How can I get Xcode to detect this new test so I can run it?


Solution

  • Apple Documentation: A test method is an instance method on an XCTestCase subclass, with no parameters, no return value, and a name that begins with the lowercase word test. Test methods are automatically detected by the XCTest framework in Xcode.

    Make sure your method has test at the start of the name.