简体   繁体   中英

Remove unit testing from Xcode project?

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?

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.)

在此处输入图片说明

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

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:

在此处输入图片说明

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM