Installing Calabash on Windows
- PDF for offline use:
- Related Links:
Let us know how you feel about this.
last updated: 2016-01
This guide will discuss how to install Ruby and Calabash on Windows.
In order to create or run Calabash test scripts it is necessary to use Ruby and have the Calabash client libraries. Xamarin Test Cloud uses Ruby 2.3.1p112. For maximum compatibility with tests run locally and tests run in Test Cloud it is recommended that you use the same version while developing tests. The Calabash libraries are available via the following Ruby gems:
- calabash-cucumber gem – these are the API’s for writing tests that target iOS applications and the command line utilities for running the tests locally.
- calabash-android gem – these are the API’s for tests targeting Android applications and the command line utilities for running the tests locally.
- xamarin-test-cloud gem – this gem contains the command line utility
test-cloudwhich is necessary to submit mobile applications and tests to Xamarin Test Cloud.
A Ruby gem is a self-contained package that is the standard format for distributing Ruby programs and libraries. Gems are typically hosted and distributed at RubyGems.org and are installed via the gem command line tool.
There are two ways to configure a working environment for creating and using Calabash scripts:
- The Calabash Sandbox – this is a Bash script that installs Ruby and Calabash in a sandbox environment.
- Maintain it yourself – Experienced Ruby developers and testers are encouraged to use rbenv to manage their Ruby version and Bundler to manage the Ruby gems on a per-project basis.
The Calabash Sandbox will create a sandbox environment that ensures you have the most compatible version of Ruby and current versions of the Ruby gems for the Calabash scripts.
This guide is for Microsoft Windows.
It is only possible to test Android applications on Microsoft Windows. Testing iOS apps on Windows is not supported; you must use OS X for that. Windows Phone is not yet supported by Calabash or Xamarin Test Cloud.
Calabash requires Ruby 2.0 or higher. Calabash is not supported on Ruby earlier than Ruby 2.0. Xamarin Test Cloud uses Ruby 2.1.5.p273. For maximum compatibility with tests run locally and tests run in Test Cloud it is recommended that you use the same version while developing tests.
This guide was written with the following assumptions:
- You must have the Android SDK installed, and the
ANDROID_HOMEenvironment variable must be set with the path to the Android SDK directory.
- The test author is comfortable with using Windows Powershell at the command line.
- Ruby has been installed. Please consult the guide Installing Ruby on Microsoft Windows for instructions on how to installing Ruby in Microsoft Windows.