# Xcode UI Test Build for testing fails

**URL:** <https://discuss.bitrise.io/t/xcode-ui-test-build-for-testing-fails/6718>\
**Category:** Tooling Issues\
**Tags:** testing\
**Created:** [November 7, 2018, 3:41pm UTC](https://discuss.bitrise.io/t/xcode-ui-test-build-for-testing-fails/6718 "2018-11-07T15:41:24Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![MattCheetham](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.bitrise.io/mattcheetham/32/1335_2.png) [@MattCheetham](https://discuss.bitrise.io/u/MattCheetham)\
**Post date:** [November 7, 2018, 3:41pm UTC](https://discuss.bitrise.io/t/xcode-ui-test-build-for-testing-fails/6718/1 "2018-11-07T15:41:24Z")

</div>

I’m trying out the new unit testing build step. Now, our project compiles just fine normally but I’ve put in the new build for testing step and I get a series of errors.

`error: There are no accounts registered with Xcode. Add your developer account to Xcode (in target 'Multi App UI Tests')`

Then an error saying it can’t find a provisioning profile for the test target and then an exit with error code 65.

Then `Error writing xctestrun file: Error Domain=NSCocoaErrorDomain Code=4 "The folder “Multiple Society App_iphoneos12.1-arm64e.xctestrun” doesn’t exist." UserInfo={NSFilePath=/Users/vagrant/Library/Developer/Xcode/DerivedData/GDPC_First_Aid-dgryfgbfadrustfujbmiqgrczphc/Build/Products/Multiple Society App_iphoneos12.1-arm64e.xctestrun, NSUserStringVariant=Folder, NSUnderlyingError=0x7fab1def0550 {Error Domain=NSPOSIXErrorDomain Code=2 "No such file or directory"}}`

I was using the auto-provision step, but I tried switching it out for the old certificate and profile installer with no luck.

I tried copy pasting the xcodebuild command that Bitrise runs for the build-for-testing step and running locally and it works just fine. Struggling to work out what is going on here. No idea why I would be getting provisioning errors when exporting and uploading to the app store works just fine normally in this workflow.

Any ideas?

---

<div class="post-metadata">

**Author:** ![bitce](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.bitrise.io/bitce/32/1639_2.png) [@bitce](https://discuss.bitrise.io/u/bitce)\
**Post date:** [November 8, 2018, 9:22am UTC](https://discuss.bitrise.io/t/xcode-ui-test-build-for-testing-fails/6718/2 "2018-11-08T09:22:15Z")

</div>

Hi @MattCheetham,

Sorry to hear about these issues. Can you please include a build URL for us to be able to look into this?

---

<div class="post-metadata">

**Author:** ![MattCheetham](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.bitrise.io/mattcheetham/32/1335_2.png) [@MattCheetham](https://discuss.bitrise.io/u/MattCheetham)\
**Post date:** [November 21, 2018, 2:15pm UTC](https://discuss.bitrise.io/t/xcode-ui-test-build-for-testing-fails/6718/3 "2018-11-21T14:15:46Z")

</div>

> **[Bitrise - Mobile Continuous Integration and Delivery](https://app.bitrise.io/users/sign_in)**
>
> Mobile Continuous Integration and Delivery for your whole team, with dozens of integrations for your favourite services.

---

<div class="post-metadata">

**Author:** ![fehersanyi-bitrise](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.bitrise.io/fehersanyi-bitrise/32/1912_2.png) [@fehersanyi-bitrise](https://discuss.bitrise.io/u/fehersanyi-bitrise)\
**Post date:** [November 21, 2018, 2:27pm UTC](https://discuss.bitrise.io/t/xcode-ui-test-build-for-testing-fails/6718/4 "2018-11-21T14:27:06Z")

</div>

Hello there!  
The thing here is that the auto provisioning only gets the profile for the main target, and you use a different target for UI test, so I would recommend the certificate and profile installer here.

In the future we will add this feature for the auto provision step as well but now it is just not possible.😕

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex016/uploads/bitrise/original/2X/d/d901cf2aad020f2dd11918afc89ec2089bb87b35.png) [@system](https://discuss.bitrise.io/u/system)\
**Post date:** [December 21, 2018, 2:27pm UTC](https://discuss.bitrise.io/t/xcode-ui-test-build-for-testing-fails/6718/5 "2018-12-21T14:27:10Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
