简体   繁体   English

Xcode Ui-automation - 测试未在物理设备上运行

[英]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 -my物理设备正在运行ios 9.0

-I have a provisioned profile (the app is running on the device) - 我有一个配置的配置文件(应用程序在设备上运行)

-I already enabled UI automation (settings->developer) - 我已启用UI自动化(设置 - >开发人员)

-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. 但是当我运行测试(UI测试)时,会有一条消息“测试成功”(设备上没有任何反应,应用程序根本没有打开,根本没有错误消息),当我去了报告导航器,没有与测试相关的信息,我刚刚运行。

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 ! 似乎xcode没有运行测试,但它显示“测试成功”消息谢谢!

It seems like there are various reasons why this "Test Succeeded" message can occur. 似乎有各种原因可以解释为什么会出现“Test Succeeded”消息。 In my case, if I open the Mac OS X Console program, I see: 就我而言,如果我打开Mac OS X控制台程序,我会看到:

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 12/25/15 10:46:51.940 AM Xcode [42471]:_ connect_to_port(thread 0x7000004ac000):USBMuxConnectByPort无法连接到端口43234上的设备[snip]:连接被拒绝

Experiments: 实验:

a) Unplugging the device from the USB cable, and plugging it in: No effect. a)从USB电缆上拔下设备的插头,然后将其插入:无效。

b) Restart Xcode and remove Derived Data: No effect. b)重新启动Xcode并删除派生数据:无效。

c) Restart the device (iPhone in this case): That worked! c)重启设备(在这种情况下为iPhone): 这有效!

供应配置文件需要正确,我刚刚添加了更新的配置配置文件,并且工作正常

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM