In a new project I have this simple test
#import #import \"ViewController.h\" @interface ViewControllerTests : XCTestCase @end @imp
For me it was just a case of having no test targets added for the Scheme.
For the app target go to Edit Scheme, then click Test on the right hand side then add a test target with the + button at the bottom: