Eimantas
Eimantas

Reputation: 49354

Running iOS project unit tests from Jenkins does not produce any output

I have setup Jenkins with git and Xcode plugins so that I would be able to build an iOS project on CI machine. However - I don't seem to get any unit test output in the console. I see the compilation messages (for implementation files as well as xibs), I see the build of test bundle, but no "test passed" or "test failed" messages. Running unit tests from Xcode produces all the needed output. What am I missing?

Upvotes: 0

Views: 1292

Answers (2)

sti
sti

Reputation: 11075

Your problem might be caused by several things. To approach the solution there are some things you need to know:

  • How do you run Jenkins? Did you use the Jenkins Mac installer from http://jenkins-ci.org?
  • Is Jenkins running under your user account? Or is it running as someone else? Is it running as a launch daemon?
  • Do your tests require access to WindowServer or are they completely happy only the commandline?
  • What is going on in your machine?

When Jenkins runs the build and the unit tests do not run, open Activity Monitor, show the process tree, check the sub processes of Xcode and if you find a process that looks like your unit test and then sample it (either with the Sample button in Activity Monitor or the "sample" command line utility). What is the process doing based on the samples?

If your unit tests require access to WindowServer and you are running Jenkins as a launch daemon, you might be interested in https://github.com/stisti/jenkins-app

Upvotes: 1

Tyler Smith
Tyler Smith

Reputation: 1279

Normally output like "Test x passed" or "Test x Failed" is due to the testing suite outputting to the console. When I call MSTest, I am calling via the cmd and the output is relayed back through jenkins. It sounds like you need something to read the output xcode is making and display it back to you. Sounds like you may not be able to do this in real time unless there is some sort of output goes to console flag you are not setting.

Upvotes: 0

Related Questions