ctpenrose
ctpenrose

Reputation: 1585

Xcode 4: can't select target for test scheme

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.

Upvotes: 11

Views: 15241

Answers (4)

Richard Lovejoy
Richard Lovejoy

Reputation: 663

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.)

Upvotes: 13

MarCoZ
MarCoZ

Reputation: 1

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.

Upvotes: 0

ctpenrose
ctpenrose

Reputation: 1585

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.

Upvotes: 0

Adam Bryzak
Adam Bryzak

Reputation: 2668

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.

Upvotes: 9

Related Questions