Installing the Calabash Sandbox

PDF for offline use
Related Articles:
Related Links:

Let us know how you feel about this

Translation Quality


0/250

last updated: 2016-09

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 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 on OS X

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.

Using the Calabash Sandbox on Windows

The Calabash Sandbox requires Windows 10 and Powershell. To install, open an administrator Powershell and change the execution policy to unrestricted:

set-executionpolicy unrestricted

Next, download and install the Calabash Sandbox installer script:

(New-Object System.Net.WebClient).DownloadString("https://raw.githubusercontent.com/calabash/install/master/install-windows.ps1") | iex

After the script has run, you should see something similar to the following:

Done! Installed:
calabash-ios:       0.16.4
calabash-android:   0.5.15
xamarin-test-cloud: 1.1.2
Execute 'calabash-sandbox' to get started!

Finally, reset the execution policy to restricted:

set-executionpolicy restricted

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.