Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Xcode 6.3 missing unit test status/run in editor

I just upgraded to Xcode 6.3 and I have lost the unit test status/run indicators that were displayed in the left gutter of the editor. The status/run indicators don't immediately show in the Test Navigator either until after I perform a compile and test (Ctrl-U). After the tests have run the Test Navigator will display the status/run indicators but the status/run indicators in the editor are never displayed.

Has anyone else noticed this? I would really need to get these back. I hope someone knows how to fix this.

Thanks in advance.

like image 285
Rob Avatar asked Apr 11 '15 05:04

Rob


People also ask

How do I run unit test in Xcode?

Adding a unit test in XcodeGo to File > New > Target. Select iOS Unit Testing Bundle and then click Next. When you create a new Unit Test target for your project, it consists of a template class.

How do I add unit tests to an existing Xcode project?

To add a unit test target to an existing Xcode project, choose File > New > Target. Select your app platform (iOS, macOS, watchOS, tvOS) from the top of the New Target Assistant. Select the Unit Testing Bundle target from the list of targets.

How do I run all test cases in Xcode?

Using ⌃⌘U will run all the test cases without building the test target. It is the opposite of ⇧⌘U. This is especially useful when you want to skip a slow-building test target and jump straight into running all the test cases.


1 Answers

Sorry. I thought I'd read through the Apple's latest release notes for Xcode, but I apparently missed this part. Thanks anyway.

Swift tests are not automatically discovered in this release of Xcode. Test annotations in the source editor sidebar will not appear, and the test navigator and the table of tests in the Test action of the scheme sheet will be empty. You can run Swift tests by selecting Product > Test. Once tests have been run, they appear in the test navigator and the scheme sheet. The following limitations apply:

Tests discovered through execution in this manner provide limited interaction in the test navigator. For example, Run buttons do not appear and clicking on a test in the navigator does not jump to the source code except in the case of a test error. Run buttons and test success/fail indicators will not appear in the source editor. (20373533)

like image 146
Rob Avatar answered Oct 08 '22 06:10

Rob