无法在设备和模拟器上启动calabash服务器

时间:2014-07-19 11:28:30

标签: android testing cucumber calabash

我一直在尝试在我身上运行一个简单的葫芦示例,我可以将应用程序推送到设备和模拟器上,但随后我收到一条消息“无法在后台启动服务器”。我试过在不同的端口启动它但是徒劳无功。也没有日志。 任何帮助将不胜感激,下面是详细日志

C:\calabash>calabash-android run AndroidDemoProject.apk -v
2014-07-27 21:30:59 - JDK found on PATH.
2014-07-27 21:30:59 - JDK found at: C:\java
2014-07-27 21:30:59 - Android SDK found at: C:\Android
2014-07-27 21:30:59 - C:/Ruby200/bin/ruby.exe -S cucumber -v MAIN_ACTIVITY=sh.ca
laba.demoproject.AndroidDemoProjectActivity APP_PATH="C:/calabash/AndroidDemoPro
ject.apk" TEST_APP_PATH="test_servers/4251d38546a8307dd4c0aa2e9fcb2c29_0.5.1.apk
"
*** WARNING: You must use ANSICON 1.31 or higher (https://github.com/adoxa/ansic
on/) to get coloured output on Windows
Code:
  * features/support/env.rb
DL is deprecated, please use Fiddle
  * features/support/app_installation_hooks.rb
  * features/support/app_life_cycle_hooks.rb
  * features/support/hooks.rb
  * features/step_definitions/calabash_steps.rb

Features:
  * features/my_first.feature
Parsing feature files took 0m0.019s

Feature: Demo feature

  Scenario: I can start my app                                 # features\my_fir
st.feature:2
2014-07-27 21:31:01 - First scenario in feature - reinstalling apps
2014-07-27 21:31:01 - connected_devices: ["emulator-5554"]
2014-07-27 21:31:01 - "C:\Android/platform-tools/adb.exe" -s emulator-5554 forwa
rd tcp:34778 tcp:7102
2014-07-27 21:31:01 -
2014-07-27 21:31:01 - Uninstalling: sh.calaba.demoproject.test
2014-07-27 21:31:05 - Success

2014-07-27 21:31:05 - Uninstalling: sh.calaba.demoproject
2014-07-27 21:31:07 - Success

2014-07-27 21:31:07 - Installing: test_servers/4251d38546a8307dd4c0aa2e9fcb2c29_
0.5.1.apk
1360 KB/s (544849 bytes in 0.391s)
2014-07-27 21:31:15 -   pkg: /data/local/tmp/4251d38546a8307dd4c0aa2e9fcb2c29_0.
5.1.apk

Success

2014-07-27 21:31:17 - Installing: C:/calabash/AndroidDemoProject.apk
1061 KB/s (38039 bytes in 0.035s)
2014-07-27 21:31:20 -   pkg: /data/local/tmp/AndroidDemoProject.apk

Success

2014-07-27 21:31:23 - Starting test server using:
2014-07-27 21:31:23 - "C:\Android/platform-tools/adb.exe" -s emulator-5554 shell
 am instrument -e target_package sh.calaba.demoproject -e main_activity sh.calab
a.demoproject.AndroidDemoProjectActivity -e test_server_port 7102 -e class sh.ca
laba.instrumentationbackend.InstrumentationBackend sh.calaba.demoproject.test/sh
.calaba.instrumentationbackend.CalabashInstrumentationTestRunner
  Could not execute command to start test server (RuntimeError)
  C:/Ruby200/lib/ruby/gems/2.0.0/gems/calabash-android-0.5.1/lib/calabash-androi
d/operations.rb:529:in `start_test_server_in_background'
  C:/Ruby200/lib/ruby/gems/2.0.0/gems/calabash-android-0.5.1/lib/calabash-androi
d/operations.rb:110:in `start_test_server_in_background'
  C:/calabash/features/support/app_life_cycle_hooks.rb:5:in `Before'
    And I wait for "Hello World, AndroidDemoProject" to appear # calabash-androi
d-0.5.1/lib/calabash-android/steps/progress_steps.rb:22
2014-07-27 21:31:23 - java -jar C:/Ruby200/lib/ruby/gems/2.0.0/gems/calabash-and
roid-0.5.1/lib/calabash-android/lib/screenshotTaker.jar emulator-5554 "screensho
t_0.png"
2014-07-27 21:31:26 - It looks like your app is no longer running.
It could be because of a crash or because your test script shut it down.
2014-07-27 21:31:26 - Server not responding. Moving on.

Failing Scenarios:
cucumber features\my_first.feature:2 # Scenario: I can start my app

1 scenario (1 failed)
1 step (1 skipped)
0m25.261s

0 个答案:

没有答案