Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Xcode Ui-automation - Test not running on physical device

Is there any specific configuration if I want to run a test on a physical device?

-my physical device is running ios 9.0

-I have a provisioned profile (the app is running on the device)

-I already enabled UI automation (settings->developer)

-My active scheme is my target, and I selected the physical device

But when I run a test (UI test), there is a message "test succeeded " (nothing happens on the device, the app doesn't open at all, there is no error messages at all), and when I go to the report navigator, there is no info related with the test, that I just run.

if I run this test on the simulator it will run without problem. Seems like xcode is not running the test at all, but it's showing the "test succeeded" message Thanks !

like image 399
Joao_dche Avatar asked Oct 29 '15 00:10

Joao_dche


People also ask

How do I enable UI Automation on my Iphone?

Enable UI Automation On the Device On the iOS device, navigate to Settings > Developer. In the UI Automation section, turn on the setting for Enable UI Automation.

How do I add a test device in Xcode?

Add your test devices to your developer program account On the Member Center page, click Certificates, Identifiers & Profiles, and then click Devices > All. Click in the upper-right corner. Click Register Device. Enter the device name and UDID.

How do I test my iOS UI?

Recording a UI Test From the debug bar, click the Record UI Test button. Xcode will launch the app and run it. You can interact with the element on-screen and perform a sequence of interactions for any UI test. Whenever you interact with an element, Xcode writes the corresponding code for it into your method.


1 Answers

It seems like there are various reasons why this "Test Succeeded" message can occur. In my case, if I open the Mac OS X Console program, I see:

12/25/15 10:46:51.940 AM Xcode[42471]: _connect_to_port (thread 0x7000004ac000): USBMuxConnectByPort failed to connect to the device [snip] on port 43234: Connection refused

Experiments:

a) Unplugging the device from the USB cable, and plugging it in: No effect.

b) Restart Xcode and remove Derived Data: No effect.

c) Restart the device (iPhone in this case): That worked!

like image 116
Chris Prince Avatar answered Oct 19 '22 05:10

Chris Prince