title: Jenkins iOS job broken because "FATAL: Log statements out of sync: current test case was null"
body: <p>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:</p>
  
  <p>[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</p>
  
  <p>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: <a href="http://baolei.tumblr.com/" rel="noreferrer">http://baolei.tumblr.com/</a>, in which it says:</p>
  
  <p>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?</p>
  
  <p>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.</p>
  
  <p>My unit test runs very well within Xcode. So it obviously doesn't help me out. </p>
  
  <p>Please someone advice me a way or any clues. Thanks in advance.</p>
  
  <p>BTW, my environments configured for this:
  OS 10.7
  XCode 4.6
  Jenkins (brew install package) 1.5</p>