XCode 3.1 & unittests

Discussion in 'Mac Programming' started by robsonj, Jul 26, 2008.

  1. robsonj macrumors newbie

    Joined:
    Jul 26, 2008
    #1
    Has anyone had issue getting unittests to run in xcode 3.1? I have tried writing unit test bundles and set my application up as a dependency of the unittest target, but when I execute the unittest target, my app just runs without any breakpoints being hit on my simple unittest.

    Any help is appreciated.

    Cheers
    Jonathan
     
  2. bilboa macrumors regular

    Joined:
    Jan 16, 2008
    #2
    This isn't a new problem, it's just that XCode's support for unit testing is kind of lame. For one thing, it runs the unit tests as part of the build process, not as an executable. Since build steps aren't run under the debugger, your breakpoints will never be hit while running unit tests using the builtin mechanism.

    I found this helpful page which describes how to setup an executable target to run your unit tests, which allows running them under the debugger:

    http://chanson.livejournal.com/119578.html
     

Share This Page