53

When I created my iOS project in Xcode 5 I clicked the option to add testing to the project. Is it possible to remove all that testing stuff, just as though I hadn't clicked the option to begin with?

Suragch
  • 484,302
  • 314
  • 1,365
  • 1,393
Kent
  • 1,705
  • 3
  • 16
  • 26
  • 8
    I strongly suggest you rethink this. – MJN May 07 '14 at 22:49
  • 2
    In my case, I had an empty Objective-C test set. I wanted to remove it, so I could add a new Swift-based test set. The OP didn't say they weren't going to have tests - they just wanted to remove the ones that were there - and I'm grateful for the question. – leanne Apr 15 '20 at 22:26

2 Answers2

64

Xcode 7+

Click your project name in the Project Navigator. Then select your Tests target. Click the minus (-) button at the bottom to delete it. (Select everywhere in red in the image below.)

enter image description here

As mentioned in a comment earlier, it is a good idea to do Unit Testing (and UI testing) in your projects. So, if you want to add them back in then just click the plus (+) button.

See also

Community
  • 1
  • 1
Suragch
  • 484,302
  • 314
  • 1,365
  • 1,393
56

I suggest to make test in your project.

But in any case, you might to leave there the target.

Otherwise, if you want delete at any cost, you have just to click on your project settings and click on this icon:

enter image description here

You will see your targets and you will can delete the test target. At this point you might want delete the test classes too: on the folder hierarchy, select these and just press backspace, confirming the deletion.

Matteo Gobbi
  • 17,697
  • 3
  • 27
  • 41