How do I clear unit test results in Xcode?

Viewed 6534

I'm having trouble clearing the test results for unit tests in Xcode 4. Basically, I ran a unit test which results in normal warnings. But, when I switch to regular bundle and run a build, the unit test results are still sticking around.

Is there any way to clear them from the Issue Navigator?

Basically, I want a way to clear the Issue Navigator.

4 Answers

Delete all the logs in ~/Library/Developer/Xcode/DerivedData/<project>/Logs/Test

enter image description here

PS: the easiest way to shortcut to this folder within Xcode is:

  • goto the "Report Navigator" (last tab in the panel on the left)
  • right click an entry that begins "Test" or "Log" or "Coverage"
  • chose "Show in Finder".

enter image description here

As of Xcode 12.5, there's a new menu item under the Product menu called Clean Test Results with a default keyboard shortcut of control-option-command-K. That will clear the red/green badges from all tests.

Screenshot of Xcode 13.4.1 showing Product->Clean Test Results menu option

Related