Visual Studio App Center Test is the next generation of Xamarin Test Cloud! Read the blog post.

Installing the Calabash Gems

PDF for offline use
Related Links:

Let us know how you feel about this

Translation Quality


0/250

last updated: 2016-10

The Calabash Sandbox is the best way for a novice to get started with Calabash. This is a Bash script that will establish a pre-configured Ruby environment with everything necessarily to creating and running tests. This will ensure maximum compatibility between a local test environment and the Xamarin Test Cloud environment. The Calabash Installer script is only available for OS X Yosemite and OS X El Capitan. The Calabash installer script will setup the Calabash Sandbox with the following gems:

The Calabash Sandbox ignores the default Ruby configuration on a computer and stores its files in the directory $HOME/.calabash/sandbox. The Sandbox shell has its own PATH, GEM_PATH, and GEM_HOME environment variables, which are updated to reference the Sandbox directory. When the Calabash Sandbox exits, these environment variables are restored to their previous values.

Using the Calabash Sandbox

To install the Calabash Sandbox, run the following script in a Terminal session:

curl -sSL https://raw.githubusercontent.com/calabash/install/master/install-osx.sh | bash

Do not use sudo to install the Calabash Sandbox.

When installation completes, you should see something like the following:

Preparing Ruby 2.1.6-p336...
######################################################################## 100.0%
Installing gems, this may take a little while...
######################################################################## 100.0%
Preparing sandbox...
######################################################################## 100.0%
Done! Installed:
calabash-ios:       0.19.2
calabash-android:   0.7.3
xamarin-test-cloud: 2.0.0
Execute 'calabash-sandbox update' to check for gem updates.
Execute 'calabash-sandbox' to get started!

At this point, you can execute calabash-sandbox in a Terminal session to initiate a sandbox environment. To leave the sandbox environment and return the Terminal session to its previous state, type exit.

Upgrade to the calabash-ios 0.20.2 gem

This guide assumes that the calabash-cucumber 0.20.0 gem is installed. The output from the Calabash Sandbox installer script will tell you what version of the gems have been installed. It may be necessary to update the gems used by the Calabash Sandbox. This can be done used by typing calabash-sandbox update at the command line:

$ calabash-sandbox update
Updating gems...
Fetching gem metadata from https://rubygems.org/..........
Fetching version metadata from https://rubygems.org/..
Fetching dependency metadata from https://rubygems.org/.
Resolving dependencies...
Using CFPropertyList 2.3.3
Using awesome_print 1.7.0
Using builder 3.2.2
Using bundler 1.13.1
Using gherkin 4.0.0
Using cucumber-wire 0.0.1
Using diff-lcs 1.2.5
Using multi_json 1.12.1
Using multi_test 0.1.2
Using escape 0.0.4
Using httpclient 2.8.2.4
Using json 1.8.3
Installing retriable 2.0.2
Using thor 0.19.1
Using rubyzip 1.2.0
Using clipboard 1.1.1
Using edn 1.1.1
Using geocoder 1.4.0
Using command_runner_ng 0.1.0
Using i18n 0.7.0
Installing mime-types 2.99.3
Using cucumber-core 1.5.0
Using luffa 2.0.0
Using run_loop 2.2.0
Using xamarin-test-cloud 2.0.0
Using cucumber 2.4.0
Using slowhandcuke 0.0.3
Installing calabash-android 0.8.2
Using calabash-cucumber 0.20.0
Bundle updated!

Done! Now the sandbox contains:
calabash-ios:       0.20.0
calabash-android:   0.8.2
xamarin-test-cloud: 2.0.0

Now that the Calabash Sandbox is installed, and the latest gems let us examine how to link the Xamarin Test Cloud Agent into the iOS app next.

Xamarin Workbook

If it's not already installed, install the Xamarin Workbooks app first. The workbook file should download automatically, but if it doesn't, just click to start the workbook download manually.