title: Xcode 8 Jenkins JUnit error: test report no report files found
body: <p>I'm new to Jenkins and am trying to setup CI for my iOS app. I've created a unit test target in the project and have configured Jenkins to properly build and run my unit tests, but the build fails when trying to actually output the rest results xml file and I'm not sure what I'm doing wrong. I borrowed a lot of ideas presented from these sources: </p>
  
  <p><a href="https://www.raywenderlich.com/22816/beginning-automated-testing-with-xcode-part-22" rel="nofollow noreferrer">https://www.raywenderlich.com/22816/beginning-automated-testing-with-xcode-part-22</a>
  <a href="http://www.sailmaker.co.uk/blog/2013/04/02/advanced-jenkins-for-ios-and-mac/" rel="nofollow noreferrer">http://www.sailmaker.co.uk/blog/2013/04/02/advanced-jenkins-for-ios-and-mac/</a></p>
  
  <p>My actual console log after a build looks like this: </p>
  
  <pre><code>=== BUILD TARGET run_to_it OF PROJECT run_to_it WITH CONFIGURATION Debug ===
  
  Check dependencies
  
  === BUILD TARGET run_to_itTests OF PROJECT run_to_it WITH CONFIGURATION Debug ===
  
  Check dependencies
  
  ** BUILD SUCCEEDED **
  
  Recording test results
  ERROR: Step ‘Publish JUnit test result report’ failed: No test report files were found. Configuration error?
  Finished: FAILURE
  </code></pre>
  
  <p>My build step execute shell looks like this :</p>
  
  <pre><code>export DEVELOPER_DIR=/Applications/Xcode.app/Contents/Developer/
  
  security unlock-keychain -p ${KEYCHAIN_PASSWORD} ${KEYCHAIN_PATH}
  security set-key-partition-list -S apple-tool:,apple:,codesign: -s -k ${KEYCHAIN_PASSWORD} ${KEYCHAIN_PATH}
  xcrun xcodebuild clean build CODE_SIGN_IDENTITY="${CODE_SIGNING_IDENTITY}" PROVISIONING_PROFILE=${PROVISIONING_PROFILE} OTHER_CODE_SIGN_FLAGS="--keychain ${KEYCHAIN_PATH}"
  
  
  xcodebuild -target run_to_itTests -configuration Debug -sdk iphonesimulator ONLY_ACTIVE_ARCH=NO TEST_AFTER_BUILD=YES GCC_TREAT_WARNINGS_AS_ERRORS=NO WANT_IOS_SIM=YES OBJROOT="${WORKSPACE}"/tmp/objs build | /usr/local/bin/ocunit2junit
  </code></pre>
  
  <p>My post build step for where the test reports are to be placed looks like this: 
  <a href="https://i.stack.imgur.com/1xprf.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/1xprf.png" alt="enter image description here"></a></p>
  
  <p>I've ensured I've installed the necessary plugins as well as installing the <code>ocunit2junit</code> gem in the <code>/usr/local/bin</code> directory as well as having installed the <code>JUnit</code> plugin in Jenkins.</p>
  
  <p><a href="https://i.stack.imgur.com/SYdk0.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/SYdk0.png" alt="enter image description here"></a><a href="https://i.stack.imgur.com/XDl8y.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/XDl8y.png" alt="enter image description here"></a></p>
  
  <p>I'm not 100% sure if any xml file is being generated at all as I've looked through every folder in the Jenkins workspace and see no such xml file anywhere. I'm not sure if I need to explicitly specify this file to be created in any of the build steps or if it is handled by default. I've looked far and wide on the internet and I've not been able to conclusively figure out the problem. </p>
  
  <p>For context: My Jenkins server is running on my Mac at the moment. I have a Jenkins user with a workspace on my local machine. I'm also running <code>macOS Sierra</code> and I'm not sure if there could be any permissions issues with the test-reports folder. I see that the folder is being created but no xml file is ever placed inside of it. </p>
  
  <p>If I remove the <code>Publish JUnit test report result</code> then my project will build successfully. </p>