Xcode does not show Unit Test arrows or is able to find the XCTest.h for browsing.

Originator:chris
Number:rdar://23752017 Date Originated:03-Dec-2015 04:02 PM
Status:Fixed Resolved:
Product:Developer Tools Product Version:7.1.1 and 7.2 beta
Classification:UI/Usability Reproducible:Always
 
Summary:

I've tried using Xcode 7.1.1 and Xcode 7.2 beta on my project workspace, and in both of them, the editor is failing to detect the Unit tests in my test target. I've tried creating a brand new, fresh, test target and the tests will run and pass, but will not be detected in the editor. Here's the test file that I tried, which was just created with the new test target.

#import <XCTest/XCTest.h>
@interface UnitTests : XCTestCase
@end
@implementation UnitTests
- (void)setUp {
    [super setUp];
    /
}
- (void)tearDown {
    /
    [super tearDown];
}
- (void)testExample {
    /
    /
}
- (void)testPerformanceExample {
    /
    [self measureBlock:^{
        /
    }];
}
@end

I've even tried to delete the DerivedData directory, and reset the Xcode defaults with `defaults delete com.apple.dt.Xcode`.  There is also funky weirdness with trying to find the XCTest.h header file. When I command-click on the header file's line, I get a notification bubble with a "?" in it and an alert. This seems to be a failure of Xcode to find the header file.

Steps to Reproduce:
Open the file in the Xcode editor, and wait for indexing to finish. Then, notice that the file does not ever get the unit test arrows.

Expected Results:
I used to have arrows in the gutter that I can use to re-run tests, and I could browse to the XCTest.h header file.

Actual Results:
I can run the tests, and I they are successful, but I cannot rerun individual tests from the gutter arrow, and I cannot easily browse the XCTest.h header file.

Notes:
I've tried on Xcode 7.1.1 and the latest Xcode beta (7C62b), and both have the same issue. I'm on Mac OS 10.11.1. If I create a brand new project, the whole thing works. So it seems like something is messed up in my project file, but I'm getting no warnings or errors, and no way for me to figure out what is wrong.

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!