Could not determine bundle identifier for xxxTest TEST_HOST
<p>We do have troubles getting our CI to work with Xcode. We encounter the issue <code>Could not determine bundle identifier for xxxTest TEST_HOST: some path that does not exist</code>.</p>

<p>What we have done so far:</p>

<ul>
<li>On the CI Machine we are able to run all tests on the device, but if we trigger it with a commit the CI does end in that error. </li>
<li>We had that issue on other machines too, when we tried to run the tests of the application. We fixed that by cleaning the machine and reboot the devices.(Had do fix some scheme settings) Not we can run all tests but we run into the issue sometimes without any reason.</li>
<li>We also double checked the schemes. The Host Application is set in every Tests scheme to the App itself.</li>
</ul>

<p>Our project has the following targets:</p>

<ul>
<li>App</li>
<li>App Unit Tests</li>
<li>App UI Tests</li>
<li>AppeareanceKit (Module)</li>
<li>AppeareanceKit Unit Tests</li>
<li>Models (Module)</li>
<li>Models Unit Test</li>
</ul>

<p>Found solution:</p>

<ol>
<li>Diabling the Tests except the App UITest</li>
<li>Run the tests once</li>
<li>Enable all Tests</li>
<li>Run the tests</li>
</ol>

<p>Question:</p>

<ul>
<li>What is happening there? How can we prevent from having that issue over and over again?</li>
</ul>

<p>Known questions:</p>

<p><a href="https://stackoverflow.com/questions/37847807/xcode-8-beta-convert-to-current-swift-syntax-failed-could-not-find-test-host">Xcode 8 Beta - Convert to Current Swift Syntax Failed: Could not find test host</a></p>

<p><a href="https://stackoverflow.com/questions/39492974/tests-stop-working-under-xcode-8-test-host-error">Tests stop working under xcode 8 TEST_HOST error</a></p>