Calabash Introduction:
Calabash-android is an android-enabled UI Automation testing framework that uses the cucumber framework on the PC side, communicating with the emulator and the test apk installed on the real machine via HTTP and JSON, The test apk calls the Robotium method for UI Automation testing and supports webview operations.
1 Installing ruby,:http://rubyinstaller.org/downloads/
2 Installing jdk,:http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1880260.html
After the installation is successful, set the environment variable JAVA_HOME=C:\Program Files\Java\jdk1.7.0_65
在Path添加内容: ";%JAVA_HOME%\bin;%JAVA_HOME%\..\jre\bin"
3. Installing ANDROID-SDK
If Google's official website is not open, you can visit: http://www.androiddevtools.cn/
After the download succeeds, set the environment variable:
ANDROID_HOME=D:\adt-bundle-windows-x86_64-20140702\sdk
4. Install ant, url: http://ant.apache.org/bindownload.cgi Set environment variables:
ANT_HOME=D:\apache-ant-1.9.4Path添加内容: ";%ANT_HOME%\bin"
5.安装Dev-Kit,为:http://rubyinstaller.org/downloads/
下载后点击exe文件,将其解压,如解压到C:\DevKit。具体安装过程可参考https://github.com/oneclick/rubyinstaller/wiki/Development-Kit
6. Gem Installation Android-calabash
Set the gem's warehouse to Taobao
C:\users\asus>gem sources-l*** Current Sources * * * Http://rubygems.org/c:\users\asus>gem sources--remove http:/ /rubygems.org/source Https://rubygems.org/not present in cache C:\users\asus>gem sources-a http://ruby.taobao.org/ http://ruby.taobao.org/added to sources C:\users\asus>gem sources-l*** current Sources * * * http://ruby.taobao.org/
Installing calabash-android with the Gem command
C:\users\asus>gem Install calabash-android ... Installing RDOC documentation for escape-0.0.4 ... Installing RDOC documentation for calabash-android-0.5.1 ... C:\users\asus>calabash-android version0.5.1
7. Download the test case: https://github.com/bootstraponline/calabash_android_example
8. Set command line font: CMD input: chcp 65001 , specific reference: http://blog.sina.com.cn/s/blog_628e2ab30101ajcg.html
9. Enter the test case directory and enter Calabash-android run com.github.mobile_1.6.1.apk
Windows installation Calabash-android