I'm running close to 30 Xcode 7 UI test scripts and my tests fail 10 - 15 scripts in with this error:
Assertion Failure: UI Testing Failure - Timeout waiting to launch Target Application 0x1004c5400
<unknown>:0: error: -[Name_Tests test_FormName] : UI Testing Failure - Timeout waiting to launch Target Application 0x1004c5400
t = 30.59s Tear Down
Test Case '-[Name_Tests test_FormName]' failed (30.599 seconds).
Then, all my scripts after this failure will have this error message:
Assertion Failure: UI Testing Failure - App state is still not terminated
<unknown>:0: error: -[Name_Tests test_VideoName] : UI Testing Failure - App state is still not terminated
There is no problem with the individual scripts because they run fine on their own. Any ideas on a fix?
EDIT: The device i'm testing on is an iPad Mini on iOS 9.1 and it crashes on the startup of the test
Maybe it is XCode bug. What is your XCode version? Have you seen https://forums.developer.apple.com/thread/13234 ?