11

I have a project developed in Xcode 3 that I am transitioning to Xcode 4. When I attempt to "test" a build, I get a message that indicates that my application scheme is not configured for testing. I select "Edit Scheme" and I see that I have no tests configured. I choose "+" to add a new test, and am asked to select a target to test. The problem is there aren't any selectable targets provided. How does this target list get populated? For my project, "Build", "Run" and "Profile" are correctly populated with a target.

4 Answers 4

13

I clicked the 'No Scheme' button, and chose Manage Schemes..

I then chose "Auto create schemes now", and it brought back my schemes (iPhone simulator, etc.)

0
9

If this is for unit tests, make sure your unit test bundle target has its Wrapper Extension set to octest and Framework Search Path set to $(DEVELOPER_LIBRARY_DIR)/Frameworks. Then restart Xcode and it should appear as a target in the Test list for the scheme. I'm not sure why restarting Xcode is necessary but it seemed to work for me.

3
  • I didn't intend to do unit testing. Is that the sole intended purpose of the "Test" subcategory for schemes?
    – ctpenrose
    Mar 15, 2011 at 0:28
  • Yes, it's intended for unit testing with octest. I'm not sure if you can use it to run other types of targets. I tried to set it up for GHUnit and was unable to select my custom target.
    – Paul Solt
    Mar 15, 2011 at 0:37
  • Nowadays this can be 'xctest' if you use that framework. And the Xcode restart seems to be necessary.
    – febeling
    May 18, 2014 at 13:42
0

I chose to create a new scheme instead with the desired configuration: scheme configured to "Run", breakpoints on, and build configuration set to "debug" (taken from my XCode 3 project). I thought at first that I could easily have access to debugging, execution, archiving, conveniently from a single scheme, particularly as each of these modes ("run", test", "profile", "analyze", "archive") are selectable from the workspace toolbar. While I may be missing something I can get the desired functionality by creating a new scheme.

0

what i did was just push the toggle button "Breakpoints" in the top bar next to the Run, Stop and Scheme buttons. Then when pushing Run, the debugger will attach to the processes, stop on the breakpoints and show variables values. No scheme modification needed.

Not the answer you're looking for? Browse other questions tagged or ask your own question.