I created a new target based on the mac app target I am testing, then added the xctest classes to the files to compile.
I then added the /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/Library/Frameworks/XCTest.framework to the frameworks to link against.
Then added its path $(DEVELOPER_DIR)/Platforms/MacOSX.platform/Developer/Library/Frameworks to the Runpath Search Paths.
Then in the main.m I added the following:
XCTestSuite *suite = [XCTestSuite testSuiteWithName:@"My tests"];
[suite addTest:[VideohogCachingTest testCaseWithSelector:@selector(testCompleteSequentialText)]];
[suite run];
This ran the test testCompleteSequentialText on the class VideohogCachingTest I needed to run as a normal application, therefore allowing me to run the test by either command+R or in this case, profiling with command+I. I could then catch a zombie and trace the problem, which was not a possibility for me previously.
If you'd like to run all your tests you can do:
XCTestSuite *suite = [XCTestSuite defaultTestSuite];
[suite run];