2

Is there a way to run a single test in isolation, or a group of tests?

I find that when I am trying to debug a particular test, it's really annoying because previous test cases may trigger that same break point-- So I typically comment out all my tests except the one I am working on, but that seems so ghetto... So I am wondering if there's a better way?

patrick
  • 9,290
  • 13
  • 61
  • 112
  • Have you tried using conditional breakpoints? http://developer.apple.com/library/ios/documentation/ToolsLanguages/Conceptual/Xcode4UserGuide/060-Debug_Your_App/debug_app.html#//apple_ref/doc/uid/TP40010215-CH3-SW19 – Fruity Geek Jan 15 '13 at 03:27

2 Answers2

3

The only way I know of doing this is by editing the scheme. The "Test" action has a bunch of checkboxes where you can turn on or off groups of tests (i.e. classes) or single tests. If you're doing this with the same tests a lot, you could create a set of schemes for different groups and set it up just the way you want. (Or just edit it each time.)

Jesse Rusak
  • 56,530
  • 12
  • 101
  • 102
2

Perhaps not the answer you're looking for, but in AppCode, the iOS and OSX IDE from Jetbrains you put the cursor anywhere over the test you want, and then trigger it with a keyboard shortcut. (I use IntelliJ mapping so its Ctrl+Shift+F10).

It also has a great test runner showing green/red bars for tests that pass or fail.

Jasper Blues
  • 28,258
  • 22
  • 102
  • 185