Enable ‘Run’ in the ‘Build’ section of your test bundle’s scheme. (See http://www.raingrove.com/2012/03/28/running-ocunit-and-specta-tests-from-command-line.html)
Install the Kicker tool and the dependencies
$ gem install kicker open4 colored xcodebuild-rb
$ curl https://raw.github.com/gist/3011214/8f660de3ef091770290660680e7c195052b3b0e0/kick.rb > .kick
$ curl https://raw.github.com/gist/3011214/b1dd39b5509a87e16c691177926eced004fa2d14/run-tests.rb > run-tests
$ chmod +x run-tests
$ edit .kick
$ edit run-tests
$ kicker -c
And an example of the output:
21:04:55.90 | Executing: xcodebuild -sdk iphonesimulator -workspace AppName.xcworkspace -scheme AppUnitTests build
Building target: AppUnitTests (in AppName.xcproject)
====================================================
Configuration: Debug
................................
Finished in 2.041412 seconds.
Build succeeded.
21:04:59.47 | Success
21:04:59.47 | Executing: ./run-tests AppPostsSyncSpec
2012-07-05 21:05:02.204 otest[8715:7803] + 'AppPostsSyncSpec synchronizes remote Posts with the local DB' [PASSED]
Executed 1 test, with 0 failures (0 unexpected) in 2.188 (2.213) seconds
21:05:02.21 | Success
I haven’t tried that yet, as the app I was working on did need that.
When I played with hacking those scripts, nothing really worked to my satisfaction, so I extracted what I needed. I assume we’ll have to do the same for application tests. If you have such tests laying around, then by all means please test it and/or extract from the shell script what we need :)