AWF4vk
AWF4vk

Reputation: 5890

How do I clear unit test results in Xcode?

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.

Upvotes: 32

Views: 7929

Answers (4)

Andrew Madsen
Andrew Madsen

Reputation: 21383

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

Upvotes: 12

Oliver Pearmain
Oliver Pearmain

Reputation: 20600

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

Upvotes: 3

Eric Anderson
Eric Anderson

Reputation: 351

After writing Kiwi BDD tests I have to completely close my project and reopen it to clear test cases in the Test navigator.

Upvotes: 17

AWF4vk
AWF4vk

Reputation: 5890

To answer my own question. It appears you have to switch back to the Unit Test scheme, clear the build folder, then switch back to the project to keep the issues from popping back up.

Upvotes: 10

Related Questions