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

Calabash Quick Start for Android Studio

PDF for offline use
Related Links:

Let us know how you feel about this

Translation Quality


last updated: 2016-09



Please note that Calabash is no longer under active development.

In this quick start we'll add a Calabash feature to an Android application created in Android Studio and run the test locally and in Xamarin Test Cloud. The test will confirm that the application will display the correct error message when the user enters a credit card number that is too short. Conceptually, the test will consist of the following steps:

  1. Wait for the Activity to load – Typically an Activity is quick to load, but to be safe the test will verify that the correct Activity has loaded.
  2. Enter 15 digits for the credit card number – The test must simulate data entry.
  3. Tap the Validate Credit Card button – Simulate what a user would do to call the validation logic.
  4. Confirm the Error Message – Finally, the test should assert the application has displayed the correct error message.

The following screenshot is a sample of the application:

There is a lot to cover in this guide, which will be broken up into the following sections:

  1. Installing the Calabash Sandbox – discusses how to quickly get an environment setup using the Calabash Sandbox.
  2. Build an APK ‐ will briefly cover how to create an APK to use for testing.
  3. Writing the First Test – Covers creating a simple and then running it locally in an Android emulator.
  4. Creating a Xamarin Test Cloud Team and Test Run – In this section we will create a Team for this new application and select the Android devices that our tests should run on.
  5. Running the Test in Xamarin Text Cloud – Finally, we will submit the test to Xamarin Test Cloud and run it on real devices in the cloud.


This quick start assumes that you already have your computer configured for Android application development, and that you are using Android Studio 2.2 or higher. You must have the ANDROID_HOME environment variable set.

It is recommended to use Ruby 2.3.1 or higher. If you are using Windows, you must first install Ruby. Calabash does not support the default Ruby that is installed with OS X.

Make sure you download the sample Android Studio project and expand it. This project targets API level 16 or higher.

A Test Cloud account is required if you wish to submit the tests to Xamarin. It is not necessary to have a Test Cloud account if you only wish to run the tests against a local Android emulator.

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.