I have been trying to write test cases in Swift to test my ViewController. However, when I try to instantiate my own ViewController in a XCTestCase I get \"Use of undecla
I also got this error recently and none of the above steps fixed the problem, what did fix it was removing non-swift file from the Compile sources build phase in the Target you want to run tests on.
Make sure your app is actually compiling. This was failing silently and the error message wasn't helpful