How to delete an Xcode Swift Test Class from the Test navigator?

前端 未结 3 970
名媛妹妹
名媛妹妹 2021-02-19 06:42

The Xcode Test navigator shows a list of test case classes.

I want to delete a test case class because it\'s no longer needed.

I\'ve tried many typical approach

3条回答
  •  野性不改
    2021-02-19 07:08

    Using Xcode 6.2, all I had to do was to switch to the Project navigator, select the file, and press delete. I then clicked the "Remove Reference" button in the confirmation dialog that appears. After that, the tests in that file disappeared from the Test navigator immediately. Adding the file back, the tests reappeared.

    I didn't have any need to delete the derived data folder, restart Xcode, etc.

    Adding the file to the project again instantly restored the tests in the Test navigator.

    This is certainly the desired behavior, and it sounds like it's broken in Xcode 6.3 but possibly fixed again in 6.3.1. So the real answer may just be that you need to upgrade to 6.3.1 (or downgrade to 6.2).

    Before:

    before files before tests

    After:

    after files after tests

提交回复
热议问题