• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: How to step through unit test bundle execution in Xcode 2.1?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to step through unit test bundle execution in Xcode 2.1?


  • Subject: Re: How to step through unit test bundle execution in Xcode 2.1?
  • From: Rush Manbert <email@hidden>
  • Date: Fri, 08 Jul 2005 09:15:56 -0700

Chris Hanson wrote:

On Jul 7, 2005, at 5:48 PM, Rush Manbert wrote:

I'm hoping that one of the Apple guys will read this and tell me how to use unit tests with the debugger. Since I wrote my test as soon as I finished writing the class under test, I really wanted to use the test code as a way to step through my class code and watch the data while it executed. Is this not possible?


Below is a modified version of what I posted about this in June; it describes what you need to do to debug into a C++ application that uses CPlusTest for its testing framework. The instructions I posted in June are for an Objective-C Cocoa application that uses OCUnit for its testing framework. This all assumes you're creating an application and a test bundle for it, and that you've set your test bundle up properly for testing the application (e.g. that you specified its Test Host and Bundle Loader build settings as described in the Unit Testing Guide).


Thanks for the reply Chris. However...

What I am developing is a cross-platform static library written in C++. Since it's not an app, there is no executable. I have a target that is my unit tester class and if I build it the test gets run automatically, so all of that mechanism just works. (Or works fortuitously, despite the fact that I've done something strange.) The automatic execution poses two problems:

1) I don't get an opportunity to setup the environment variables (although I could modify the script, which is described in the documentation)

2) Even if I could set the env vars, if I select the unit test target and open the debugger window, both "Debug" and "Build and Debug" are disabled.

I guess I can try creating a target that is a dummy app, then just use it as a vehicle to get to the debugger, but that seems sort of crude. Any other suggestions?

- Rush

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: How to step through unit test bundle execution in Xcode 2.1?
      • From: Chris Hanson <email@hidden>
References: 
 >How to step through unit test bundle execution in Xcode 2.1? (From: Rush Manbert <email@hidden>)
 >Re: How to step through unit test bundle execution in Xcode 2.1? (From: Chris Hanson <email@hidden>)

  • Prev by Date: Re: XCode 2.1 breakpoints not working for command line apps?
  • Next by Date: Setting up Cross Project Dependencies
  • Previous by thread: Re: How to step through unit test bundle execution in Xcode 2.1?
  • Next by thread: Re: How to step through unit test bundle execution in Xcode 2.1?
  • Index(es):
    • Date
    • Thread