获得"应用程序没有启动(RuntimeError)"试图运行的设备葫芦,机器人测试时 [英] Getting "App did not start (RuntimeError)" when trying to run calabash-android tests on device

查看:223
本文介绍了获得"应用程序没有启动(RuntimeError)"试图运行的设备葫芦,机器人测试时的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想运行一个小的初始集上的三星Galaxy S3葫芦,Android的测试连接到Windows 7的笔记本电脑,并不断收到应用程序没有启动(RuntimeError)时,尝试启动测试服务器。

I'm trying to run an small initial set of calabash-android tests on a Samsung Galaxy S3 connected to a Windows 7 laptop and keep getting an "App did not start (RuntimeError)" when trying to start the test server.

我有红宝石v1.9.3p448,RubyDevKit 4.5.2(32位),蚂蚁1.9.2,并安装AnsiCon。我已经通过输入创业板安装葫芦,机器人在命令提示符下安装蠡-的Andr​​oid 0.4.20及其所有相关的宝石。我创建使用Xamarin Studio和释放密钥库签署APK。与--dry-运行标志运行时,我设置的六个步骤初始特征是正确的分析。

I've got Ruby v1.9.3p448, RubyDevKit 4.5.2 (32-bit), Ant 1.9.2, and AnsiCon installed. I've installed calabash-android 0.4.20 and all its dependent gems by typing "gem install calabash-android" at the command prompt. I've created a signed APK using Xamarin Studio and the release keystore. My initial feature set of six steps is parsed correctly when run with the --dry-run flag.

当我输入葫芦,Android上运行com.XYZ.ABC.apk --verbose下面的事情发生:

When I type "calabash-android run com.XYZ.ABC.apk --verbose the following things happen:

  1. 在这样一个新的测试服务器创建并使用相同的密钥库的APK
  2. 签订无测试服务器存在的应用程序/葫芦
  3. 在该功能的文件被成功解析。
  4. 在测试服务器com.XYZ.ABC.test卸载成功。
  5. 在该应用程序com.XYZ.ABC.apk卸载成功。
  6. 在步骤#1中创建的测试服务器已成功安装。
  7. 在该应用程序com.XYZ.ABC.apk安装成功。
  8. 在测试服务器已启动。
  1. No test server exists for the app/calabash so a new test server is created and signed with the same keystore as the APK
  2. The feature files are parsed successfully.
  3. The test server com.XYZ.ABC.test is uninstalled successfully.
  4. The app com.XYZ.ABC.apk is uninstalled successfully.
  5. The test server created in step #1 is installed successfully.
  6. The app com.XYZ.ABC.apk is installed successfully.
  7. The test server is started.

在这一点上,我们得到了应用程序没有启动(RuntimeError)的字样。下面是相应的细节在命令行。

At this point we get the "App did not start (RuntimeError)" message. Here's the appropriate detail from the command line.

2014-03-11 08:10:05 - Starting test server using:
2014-03-11 08:10:05 - "C:\Users\BMaya\AppData\Local\Android\android-sdk/platform-tools/adb.exe" -s 4df18df165d46f4d shell am instrument -e target_package com.trimble.terraflex -e main_activity trimble.tfm.fieldapp.SplashActivity -e test_server_port 7102 -e debug false -e class sh.calaba.instrumentationbackend.InstrumentationBackend com.trimble.terraflex.test/sh.calaba.instrumentationbackend.CalabashInstrumentationTestRunner
App did not start (RuntimeError)
C:/Ruby193/lib/ruby/gems/1.9.1/gems/calabash-android-0.4.20/lib/calabash-android/operations.rb:505:in `block in start_test_server_in_background'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/retriable-1.3.3.1/lib/retriable/retriable.rb:31:in `perform'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/retriable-1.3.3.1/lib/retriable/retriable.rb:53:in `retriable'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/calabash-android-0.4.20/lib/calabash-android/operations.rb:504:in `start_test_server_in_background'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/calabash-android-0.4.20/lib/calabash-android/operations.rb:93:in `start_test_server_in_background'

我也试着用同样的结果运行的Ruby的命令提示符下测试:

I've also tried running the tests from the Ruby command prompt with the same results:

  1. 键入葫芦 - 机器人控制台com.XYZ.ABC.apk在DOS命令提示符
  2. 键入reinstall_apps在Ruby的命令提示符。
  3. 键入start_test_server_in_background在Ruby的命令提示符。

我GOOGLE了四周,尝试了以下的东西:

I've googled around and tried the following things:

  1. 确保互联网是在应用程序清单中选择(这是) - http://bit.ly/NGK0B8
  2. 手动辞职的应用程序(没有帮助) - http://bit.ly/NGKg2Z
  3. 卸载蠡-的Andr​​oid 0.4.20并重新安装(没有帮助) - http://bit.ly/1dLTlBt
  4. 签订的APK与调试密钥库,而不是释放密钥库(没有帮助)
  5. 试过示例应用程序,并从控制台上运行(得到同样的错误) - http://bit.ly/OhaV6z ,<一个HREF =htt​​p://bit.ly/Ohb8GR> http://bit.ly/Ohb8GR
  6. 检查,以确保端口7102是没有被其他任何应用程序或系统服务(它不是)。
  1. Make sure Internet was selected in the app manifest (it was) - http://bit.ly/NGK0B8
  2. Manually resigned the app (didn't help) - http://bit.ly/NGKg2Z
  3. Uninstalled calabash-android 0.4.20 and re-installed (didn't help) - http://bit.ly/1dLTlBt
  4. Signed the APK with the debug keystore instead of the release keystore (didn't help)
  5. Tried the sample app and running from the console (got same error) - http://bit.ly/OhaV6z, http://bit.ly/Ohb8GR
  6. Checking to make sure port 7102 was not blocked by any other application or system service (it wasn't).

任何帮助是AP preciated。让我知道如果你需要更多的信息。

Any help is appreciated. Let me know if you need more info.

在此先感谢。

推荐答案

我面临同样的问题。经过寻找一个解决方案天,我发现我的机器上的代理是导致该问题。检查您是否有你的机器上设置代理。 转到终端,如果你是在Mac和执行下面的语句来取消设置代理 导出HTTP_PROXY =

I was facing the same issue. After days of looking for a solution, I found that the proxies on my machine was causing the issue. Check if you have proxies set on your machine. Go to Terminal if you are on Mac and execute the below statement to unset the proxies export http_proxy=""

这篇关于获得&QUOT;应用程序没有启动(RuntimeError)&QUOT;试图运行的设备葫芦,机器人测试时的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆