通过自动化测试运行Android应用程序时出错

时间:2016-05-26 05:25:24

标签: mobile automation xamarin.android cucumber calabash-android

当我构建我的应用程序时,它显示已创建的测试服务器,但是当我运行应用程序时,它向我显示以下错误,我在下面提到过。有关详细信息,我附上了截图,请参阅。

enter image description here

场景:然后我看到“Hello World!” #features / my_first.feature:3   连接了多个设备。使用ADB_DEVICE_ARG指定设备序列(Ru ntimeError)   ./features/support/app_installation_hooks.rb:18:in Before' App did not start (RuntimeError) ./features/support/app_life_cycle_hooks.rb:5:in之前' 失败的场景: 黄瓜特色/ my_first.feature:3#场景:然后我看到“Hello World!” 1个场景(1个失败) 0步 0m17.546s

请帮我解决问题。

1 个答案:

答案 0 :(得分:0)

据说您有多台Android设备(真实或模拟)连接到本机。 Calabash使用adb与设备进行通信,如果连接了多个设备,adb需要知道要与哪个设备通信。断开您不想使用的设备,或者将设备序列号的环境变量设置为ADB_DEVICE_ARG。

您可以使用命令行

找到设备的序列号
adb devices