Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Could not determine bundle identifier for xxxTest TEST_HOST

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

What we have done so far:

  • 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.
  • 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.
  • We also double checked the schemes. The Host Application is set in every Tests scheme to the App itself.

Our project has the following targets:

  • App
  • App Unit Tests
  • App UI Tests
  • AppeareanceKit (Module)
  • AppeareanceKit Unit Tests
  • Models (Module)
  • Models Unit Test

Found solution:

  1. Diabling the Tests except the App UITest
  2. Run the tests once
  3. Enable all Tests
  4. Run the tests

Question:

  • What is happening there? How can we prevent from having that issue over and over again?

Known questions:

Xcode 8 Beta - Convert to Current Swift Syntax Failed: Could not find test host

Tests stop working under xcode 8 TEST_HOST error

like image 850
BennX Avatar asked Oct 04 '16 08:10

BennX


Video Answer


1 Answers

So after ages of having this issue, we could find the right checkbox to fix this issue.

It somehow sounds weird but the issue was the configurations for the command-line builds inside of the Project settings.

enter image description here

I assume this happens because we always test against the debug configuration and it was set to release. Therefore it did the wrong build for the test host.

This does set the defaultConfigurationName inside of the {projectname}.xcodeproject.

Please comment if you have any more insights of this.

like image 147
BennX Avatar answered Oct 19 '22 14:10

BennX