Search code examples
objective-cxcodeocunit

How do I run a subset of OCUnit tests in Xcode


I have a suite of unit tests that I use before checking in my project. However, very often it's the case that only one of them finds some regression in the code. In these cases I'd like to only run that particular unit test while debugging the failure. I haven't found any way to do this in Xcode. Is it possible?


Solution

  • Thanks for that push in the right direction. I ended using the same basic concept, but I added a GUI that lets you select what gets run as well as get a nice red/green status for each test. If anyone is interested, the code is at the URL below. The UI needs to more spit and polish, but it seems to be working.

    http://github.com/nall/XcodeUnitTestGUI/tree/master

    After I started the project above, I found this project which is really fantastic.

    http://github.com/gabriel/gh-unit