Running unit tests xCode

Does anyone know how to run unit tests in xCode?


I was able to get xCode to run unit tests from the terminal by following the instructions on http://www.raingrove.com/2012/03/28/running-ocunit-and-specta-tests-from-command-line.html. However, when I set up a command line build step in TeamCity, it does something different. The build in TeamCity never completes. It seems to build the app, and then it waits for user input. Does anyone know how to overcome this problem? Thanks.


The command that I am running is:

xcodebuild -workspace <project>.xcodeproj/project.xcworkspace -scheme TestScheme -sdk iphonesimulator TEST_AFTER_BUILD=YES clean build
2 comments
Comment actions Permalink

Hi Matt

Please try our new dedicated xCode runner.

0
Comment actions Permalink

Michael, thanks for the reply. Do I need to reinstall the runner?

I am running xCode 7.1, and from the link you gave, it seems that it comes with the xCode runner installed, also, I am able to run the builds just fine, the only issue I am having is with testing. Furthermore, I discovered yesterday, that I can make the tests run when I run them as a user with administrative privilages, but I cannot get it to run when TeamCity runs it as a super user. I am not sure how that would make a difference especially where the superuser is the case that does not work.

0

Please sign in to leave a comment.