Search code examples
iosobjective-ccocoa-touchios-ui-automation

UIAutomation tests are not working on device


I am trying to run few UIAutomation (XCTest) tests on device but as soon as I select my device a target device, all the tests in the test pane goes away and count shows 0. When I select simulator, I see all of them back.

I am using 5th Gen iPod Touch with iOS 8.3 and have enabled UI Automation in Settings --> Developer --> Enable UI Automation.

Anyone has a workaround or a solution to this situation?

PS:

  1. I am using correct provisioning profile and can run the application directly from Xcode to my device but test are going away.
  2. Tried disconnecting and reconnecting device on USB but no luck!
  3. Tried re-booting the device but no luck!
  4. Tried deleting Derived Data but no luck!

Solution

  • UI tests in Xcode require iOS 9. UIAutomation is the name of UI testing with Instruments: https://developer.apple.com/library/ios/documentation/DeveloperTools/Conceptual/InstrumentsUserGuide/UIAutomation.html