I setup a jenkins job for my iOS project. The host target runs smoothly while the unit test target failed on a very strange reason given by "jenkins console output" as below:
[DEBUG] Test Case '-[WhereYouAreTests testShowMainTopbar]' started. Test Case '-[WhereYouAreTests testShowMainTopbar]' passed (0.000 seconds). FATAL: Log statements out of sync: current test case was null Build step 'XCode' marked build as failure Finished: FAILURE
For the fake of clear, WhereYouAre is my "host target" and WhereYouAreTests is, of course, the unit test target. I DO have googled everywhere before I raised this question. The only one clue is here: http://baolei.tumblr.com/, in which it says:
getschh asked: Hi Bao. I tried your approach concerning ios unit-testing with xcode 4.5 and ios 6 with the ruby script. I reconfigured the jenkins job. First I thought: wow, this works great. When I took a close look at it, i found a big problem. I always get the following error: FATAL: Log statements out of sync: current test case was 'testBarcodeUtilWithCorrectValues'. It always happens with a different Unit-Test. The result of this error: After the error occurs, no more unit-tests are testet. What can I do?
Does it work when you run the script on a local machine (instead of through Jenkins)? If not, maybe you can try create a brand new project with just one simple test case, and use the script. If you can get a new project working fine, you can then try commenting out most of the test cases in your real project, leaving only a few tests, and see what happens. iOS test setup is finicky sometimes you really have to experiment a lot to get everything working smoothly.
My unit test runs very well within Xcode. So it obviously doesn't help me out.
Please someone advice me a way or any clues. Thanks in advance.
BTW, my environments configured for this: OS 10.7 XCode 4.6 Jenkins (brew install package) 1.5