I a trying to add Unit Test to an already working iOS App. I've searched and read many threads that address this problem, and followed their advices step-by-step but I seem to get stuck at a different place.
The app is an ordinary iPhone Application, that I am currently developing using Xcode 6.3.1 I've been able to create the 'Cocoa Touch Testing Bundle' fine for my Application. A basic test gets created, but when I press the 'Test' button, I get the message
Configure "Project Tests" for testing.
The scheme "Project Tests" is not configured for testing. Edit the scheme to enable testing, or cancel the action.
I press the 'Edit Scheme' button and go to the Edit Scheme Editor. But in that window (you can see a snapshot below this explanation) I am never able to choose any targets, all the options are actually greyed out! I've tried everything but I am not really sure what I should change in my project in order to change this and successfully create the Unit Tests... Any ideas please?
Here is the process which i have followed to add the Unit testing in a demo projects. First of all i have deleted test scheme from the project which looks like this
Then i click on the plus icon which is located in the lower corner, then under ios section from other i have selected Cocoa Touch Testing Bundle like this
Then i have selected the Language, Project and Target as i have used in my project like this
After adding the test scheme in my project, i go to Edit Scheme and selected Test from there like this
Then i selected the Plus button to add the newly created Test scheme to my project like this
From there i have selected the Scheme and see in the below screenshot, the scheme is added to my project
Then is selected to test the app and see in the below screenshot i am able to test my app
Try to do this.I hope it will help you.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With