Trying to figure out a way to delete a test case that I've added from within XCode and can't figure a way to do it. The obvious choice of using the delete key does nothing when pressed with the test case highlighted, there's no context option to delete the test case when right clicking on it.
问题:
回答1:
Why you need to delete a test from the test case view? If you want to delete it means for me that you don't need this test anymore - if yes, remove it from the code. If you need it but not now click right on it and select disable "test name"
.
回答2:
As Tomasz says, if you mean remove an individual test case then just delete that associated method from the test class. (Note: my Beta version of Xcode 6 does not seem to update the Test Navigator view properly when this happens but the test case is gone and next time you load the project will be gone from the navigator - I haven't downloaded the final Xcode 6 yet - hopefully this will be fixed).
If you are having the same problem I had (which is how I came across this question) and want to delete the whole test class then you cant do that from the Test Navigator, you have to go to the Project Navigator, find the associated test class (probably hidden in the xxxTests folder) and delete that file.
Ali