Android_windows下安装calabash-android(1)

在windows下安装calabash-android,步骤如下:
1. 参考https://github.com/calabash/calabash-android/wiki
2. 从git上下载calabash-android后,首先需要安装ruby,我安装的是ruby 2.0.0p0
3. 下载calabash-android-demoapp,安装测试时用的 android工程
4. 安装calabash-android: gem install calabash-android
5. 安装gem,cucumber, DevKit(DevKit-tdm-32-4.5.1-20101214-1400-sfx.exe)
http://www.hoowolf.net/2011/10/01/install-cucumber-on-windows/
6.在android工程目录下运行calabash-android run ../bin/AndroidDemoPeoject.apk出现错误如下:
*** WARNING: You must use ANSICON 1.31 or higher (https://github.com/adoxa/ansic
on/) to get coloured output on Windows
WARNING: cannot load such file -- 2.0/gherkinlexeren
Couldn't load 2.0/gherkinlexeren
The $LOADPATH was:
C:/Ruby200/lib/ruby/gems/2.0.0/gems/cucumber-1.2.5/bin/../lib
C:/Ruby200/lib/ruby/gems/2.0.0/gems/builder-3.2.0/lib
C:/Ruby200/lib/ruby/gems/2.0.0/gems/diff-lcs-1.2.2/lib
C:/Ruby200/lib/ruby/gems/2.0.0/gems/multi
json-1.7.2/lib
C:/Ruby200/lib/ruby/gems/2.0.0/gems/gherkin-2.11.7-x86-mingw32/lib
C:/Ruby200/lib/ruby/gems/2.0.0/gems/cucumber-1.2.5/lib
C:/Ruby200/lib/ruby/gems/2.0.0/gems/retriable-1.3.3/lib
C:/Ruby200/lib/ruby/gems/2.0.0/gems/slowhandcuke-0.0.3/lib
C:/Ruby200/lib/ruby/gems/2.0.0/gems/rubyzip-0.9.9/lib
C:/Ruby200/lib/ruby/gems/2.0.0/gems/awesomeprint-1.1.0/lib
C:/Ruby200/lib/ruby/gems/2.0.0/gems/calabash-android-0.4.3/lib
C:/Ruby200/lib/ruby/site
ruby/2.0.0
C:/Ruby200/lib/ruby/siteruby/2.0.0/i386-msvcrt
C:/Ruby200/lib/ruby/site
ruby
C:/Ruby200/lib/ruby/vendorruby/2.0.0
C:/Ruby200/lib/ruby/vendor
ruby/2.0.0/i386-msvcrt
C:/Ruby200/lib/ruby/vendor_ruby
C:/Ruby200/lib/ruby/2.0.0
C:/Ruby200/lib/ruby/2.0.0/i386-mingw32. Reverting to Ruby lexer.
6.1解决方法:
You need to

Download Ansicon from https://github.com/adoxa/ansicon/downloads and unzip it into a directory with no spaces

Use a cmd prompt and navigate to where you unzipped it.
CD into the x64 directory (unless you have a 32bit machine, then use the x86 one)
Type ansicon.exe –i
Open a new cmd prompt
6.2 继续执行calabash-android run ../bin/AndroidDemoProject.apk,出现问题如下:
WARNING: cannot load such file -- 2.0/gherkinlexeren
Couldn't load 2.0/gherkinlexeren
The $LOAD_PATH was:
C:/Ruby200/lib/ruby/gems/2.0.0/gems/cucumber-1.2.5/bin/../lib
7. 安装bundler, gem install bundler,bundle install会出现如下错误:
Bundler::GemfileNotFound
8.安装Pik (pik is a tool to manage multiple versions of ruby on Windows)



/
在windows下的完整操作步骤如下:
1. 安装git,并下载calabash-android,然后在calabash-android目录下安装calabash-android,首先需要安装gem, gem install calabash-android
2. 安装ruby 1.9.3,不要安装ruby 2.0,我安装后出现以上的错误无法解决。
3. 下载AndroidDemoProject,然后在eclipse下导入工程并运行安装到模拟器上,此时的签名为debug.keystore,然后切换到calabash目录下,执行命令calabash-android setup,然后设置keystore,密码与alias_name,设置完成后就OK了
4. 执行命令calabash-android run ../bin/AndroidDemoProject.apk,这样就开始执行操作了哦。
执行结果如下:
AndroidDemoProjectcalabash>calabash-android run ../bin/AndroidDemoProject.apk
Feature: Demo feature



Scenario: I can start my app # featuresmyfirst.feature:3
433 KB/s (528373 bytes in 1.189s)
95 KB/s (37643 bytes in 0.385s)
* I wait for "Hello World, AndroidDemoProject" to appear # calabash-android-
0.4.3/lib/calabash-android/steps/progress
steps.rb:27
1 scenario (1 passed)
1 step (1 passed)
0m52.711s

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 5
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 5
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值