calabash-android学习笔记V02.docx
文本预览下载声明
简介http://calaba.sh//blog/static/63772835201222973553425//2012/03/07/Calabash-Android/AUTOMATED ACCEPTANCE TESTING FOR MOBILE APPSCalabash?enables you to write and execute automated acceptance tests of mobile apps. Calabash is cross-platform, supporting Android and iOS native apps. It is open source and free, and has a company,?LessPainful, backing and developing it.Calabash consists of libraries that enable test-code to programmatically interact with native and hybrid apps. The interaction consists of a number of end-user actions. Each action can be one ofGesturesTouches or gestures (e.g., tap, swipe and rotate).AssertionsFor example: there should be a Login button or the web view should contain an h1 element with the text Hello.Screenshotsscreendump the current view on the current device modelCalabash could be compared to Selenium WebDriver. However, it is important to realize that interacting with a web app from a desktop computer is vastly different than interacting with a native app using a touch screen. Calabash provides APIs that are specialized to native apps running on touch screen devices.下载:/calabash/calabash-android安装/calabash/calabash-android/blob/master/documentation/installation.mdPrerequisitesYou need to have Ruby installed. Verify your installation by running ruby -v in a terminal - it should print ruby 1.8.7 (or higher).If you are on Windows you can get Ruby from?RubyIYou should have the Android SDK installed and the environment variable?ANDROID_HOME?should be pointing to it.You also need to have Ant installed and added to your pathInstall?calabash-android?by runninggem install calabash-android基本使用方法Generate a Cucumber skeletonTo get started with calabash it might be a good idea to run?calabash-android gen. It will create a Cucumber skeleton in the current folder like this:features|_support| |_app_installation_hooks.rb| |_app_life_cycle_hooks.rb| |_env.rb|_step_definitions| |_calabash_steps.rb|_my_first.featureIn this skeleton you find all the prede
显示全部