2

Xcode 4 supports running unit tests using the test build option, however I can't find a way to run the tests through the command line.

Simply running xcodebuild on the Unit Tests target does not run the tests (I have the run after build option turned on).

Any ideas?

aitskovi
  • 83
  • 1
  • 7
  • possible duplicate of [Xcode 4: Run tests from the command line (xcodebuild)?](http://stackoverflow.com/questions/5403991/xcode-4-run-tests-from-the-command-line-xcodebuild) – Merlyn Morgan-Graham Apr 06 '11 at 00:45

1 Answers1

2

I wasn't able to find any such option. The closest I have gotten so far is the ability to run logic tests only (running xcode 4 unit tests from the command line) and that's not very satisfying. I'll update my answer in Xcode 4: Run tests from the command line (xcodebuild)? if I find a better solution.

Community
  • 1
  • 1
Jonah
  • 17,609
  • 1
  • 41
  • 68
  • Thanks, it seems turning off run tests after build did the trick (I was already building a separate target through xcodebuild). – aitskovi Apr 08 '11 at 20:31
  • Jonah, I found a way to make it work. I'll be posting it tomorrow on my blog. Here's the analysis that led me to the right answer (I'll update this answer when the post is up). http://longweekendmobile.com/2011/04/15/unit-testing-in-xcode-4-use-ocunit-and-sentest-instead-of-ghunit/ – makdad Apr 15 '11 at 00:33
  • Nice overview of the tools phooze, I'm looking forward to seeing what you came up with. Glad to see more developers concerned with getting a good testing toolchain in place for iOS. – Jonah Apr 16 '11 at 15:04
  • Jonah, the real deal: http://longweekendmobile.com/2011/04/17/xcode4-running-application-tests-from-the-command-line-in-ios/ – makdad Apr 17 '11 at 19:43