XCode 3.1 & unittests

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

  1. robsonj macrumors newbie

    Jul 26, 2008
    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.

  2. bilboa macrumors regular

    Jan 16, 2008
    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:


Share This Page