Reputation: 3909
Anyone know how to get Xcode to recognize you've added a testing target so you can run the tests, cmd+U? I added the target but I'm missing something to tell Xcode or the project that there is a test suite to run (Test is grayed out in the Product menu).
Upvotes: 0
Views: 62
Reputation: 4533
Also note the test targets you create from the New Target menu are logic tests but the ones create by the New Project menu are application tests. Logic test are stand alone but in application tests your test code is injected into your application.
To make a logic test into an application test set the BUNDLE_LOADER and TEST_HOST in your test target build settings
BUNDLE_LOADER = "$(BUILT_PRODUCTS_DIR)/DC Wire Sizer.app/DC Wire Sizer";
TEST_HOST = "$(BUNDLE_LOADER)";
Upvotes: 0
Reputation: 3909
you learn something new everyday:
just messing around in xcode found "Edit Scheme" when you click on the target to run, you'll see it in the list below your current target (to the right of the Stop button).
Then go to Tests and then click the add button and add your test target:
Upvotes: 1