Building XCTest UI tests for AWS Device Farm
I have the similar issue. I dig little bit more, it seems the below might be the reason for test to get failed.
"Could not receive XCTest bundle ready message from testmanagerd, error code -7”
It seems the setup and teardown methods are by default run and hence passed. I am not sure about it. But, I will try to get more information from the logs.
I work for the AWS Device Farm team. Your analysis quoted below is on the right path.
Which to me looks like the MyAppUITests-Runner.app application hasn't included a configuration file which allows it to target the correct application. So I suspect it's something to do with the process I am using to build and upload the application and its UI Tests.
We are currently fixing an issue where the tests are not picked up if the .xctestconfiguration
file is missing from the .ipa
.
A workaround for this issue until it is fixed to get you running is to run your tests locally which will generate .xctestconfiguration
file under your .app/Plugins
folder
Before packaging for upload to device farm just make sure that the .xctestconfiguration
file is present under the .app
bundle
The Fuzz tests will work because it does not use your test code. It just takes your app and runs a custom fuzz test against it.
Another note about the location of *-Runner.app
is you should be able to find it under the Products folder from Xcode but as long as you can get to it things should be fine.
Update
This issue has been fixed since the original time of the post and there is no longer a need to have a .xctestconfiguration
file in your tests runner.
An easier solution to this is to change the location of the Derived data folder - (Under Xcode Preferneces -> Locations.
eg I put it in my User folder ( similar to my documents)
this error went away immediately after battling unsucessfully for hours. ( looks like an Xcode bug)