[XCUIApplication launch] launches the target app but can't find the target app is running

Hi,


I added UI test target to my project. When doing test recording, the app launches fine and Xcode is able to add steps to my test code file.

However, whenever I try running the test directly from Xcode, [app launch] always fails with below message even the target app does launch and is responsive.

UI Testing Failure - App state is still not running, state = XCApplicationStateNotRunning.


I'm using Xcode 7 and the target app is sanboxed, any insight what might be causing this issue?

Anyone knows how [XCUIApplication launch] check if the target app is running or not? Seems like a Xcode bug that it cannot detect that app is actually running. 😟


Thanks,

Jeffery

Replies

Related to the bug suspected here? https://forums.developer.apple.com/thread/28732

This issue appears to be now fixed in Xcode 7.3 at least in the scenario this was affecting me – UI tests now work without changes to the tests.