# iOS test target never starts causing build failure

**URL:** <https://discuss.bitrise.io/t/ios-test-target-never-starts-causing-build-failure/9057>\
**Category:** Builds\
**Tags:** ios\
**Created:** [May 20, 2019, 12:54pm UTC](https://discuss.bitrise.io/t/ios-test-target-never-starts-causing-build-failure/9057 "2019-05-20T12:54:18Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![david.huntrods](https://avatars.discourse-cdn.com/v4/letter/d/958977/32.png) [@david.huntrods](https://discuss.bitrise.io/u/david.huntrods)\
**Post date:** [May 20, 2019, 12:54pm UTC](https://discuss.bitrise.io/t/ios-test-target-never-starts-causing-build-failure/9057/1 "2019-05-20T12:54:18Z")

</div>

# Bitrise Build Issue Report template

## Description of the issue

On a specific branch of my app, there are two test targets - one running basic unit tests and another running UI tests using EarlGrey. This was all working fine until a particular changeset causes the unit test target to crash or hang on [bitrise.io](http://bitrise.io), but not for any obvious reason.

The error it spits out at the end is:  
Error Domain=IDETestOperationsObserverErrorDomain Code=6 “Early unexpected exit, operation never finished bootstrapping - no restart will be attempted” UserInfo={NSLocalizedDescription=Early unexpected exit, operation never finished bootstrapping - no restart will be attempted, NSUnderlyingError=0x7fc5e49bfb50 {Error Domain=IDETestOperationsObserverErrorDomain Code=5 “Test runner exited before starting test execution.” UserInfo={NSLocalizedDescription=Test runner exited before starting test execution., NSLocalizedRecoverySuggestion=If you believe this error represents a bug, please attach the result bundle at /var/folders/90/5stft2v13fb\_m\_gv3c8x9nwc0000gn/T/XCUITestOutput793372547/Test.xcresult}}}

## Environment:

**Where did the issue happen?**

Occurs on [bitrise.io](http://bitrise.io) Xcode 10.1.x, on macOS 10.13 (High Sierra)

**Which build Step causes the issue and which version of the step?**

xcode-test v2.3.1

## Reproducibility

- _Does a “Rebuild” help? (You can trigger a rebuild from the Build’s page, by clicking the “Rebuild” button in the top right corner of a finished build)_ : NO
- _Does a rebuild without caches help? (You can remove the `Cache:Pull` and `Cache:Push` steps temporarily to not to use the cache, or [you can delete all the caches on the `Settings` tab of the app](http://devcenter.bitrise.io/caching/about-caching/#downloading-and-deleting-caches)._ : NO
- _Does the issue happen sporadically, or every time?_ : Every time
- _Does upgrading the build Step to the latest version help?_ : NO
- _When did the issue start?_ : After removal of a large amount of legacy code from the app and unit test targets.

### Local reproduction

Can’t be reproduced locally; unit tests run and pass as expected when running using Bitrise CLI and Xcode directly. (macOS 10.14 Mojave, Xcode 10.2)

## Build log

This is on a commercial project, so the full log and build link are going by email. 😉

---

<div class="post-metadata">

**Author:** ![david.huntrods](https://avatars.discourse-cdn.com/v4/letter/d/958977/32.png) [@david.huntrods](https://discuss.bitrise.io/u/david.huntrods)\
**Post date:** [May 24, 2019, 2:56pm UTC](https://discuss.bitrise.io/t/ios-test-target-never-starts-causing-build-failure/9057/2 "2019-05-24T14:56:03Z")

</div>

Resolved the issue. The test target had originally used a pod called SnapshotTesting, and this specific branch had removed all tests that imported it along with the ` __Snapshots__ ` folder containing the stubbed network requests, but not the pod itself.

For whatever reason, including the pod in the test target with no tests and no stubs was causing the running to hang until it timed out. Removing the pod entirely fixed it.

---

<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:** [May 27, 2019, 7:22am UTC](https://discuss.bitrise.io/t/ios-test-target-never-starts-causing-build-failure/9057/3 "2019-05-27T07:22:45Z")

</div>

Hy David👋

We are glad to hear you managed to fix it! 🙃

---

<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:** [June 26, 2019, 7:30am UTC](https://discuss.bitrise.io/t/ios-test-target-never-starts-causing-build-failure/9057/4 "2019-06-26T07:30:47Z")

</div>

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