Calabash is a new functional testing tool for both IOS and Android mobile applications. Calabash is an open source functional testing developed by LessPainful.

OVERVIEW: How it works

Calabash iOS consists of two parts:

  • Client library written in Ruby
  • Calabash.framework, a server framework written in Objective-C (a Clojure/JVM version of the client is coming too).

To use calabash you make a special test target in XCode that links with calabash.framework. The application is otherwise unchanged. The server framework will start an HTTP server inside your app that listens for requests from the client library.

Calabash Android is slightly different even though the idea is much the same.


Features: The feature file is written in Cucumber and it describes the user stories we want to test. In other words it contains the steps for intended behavior of the app.

Step Definitions: Calabash Android comes with a set of predefined steps that allows us to run the test faster and it also has the facility of providing the custom (user defined) steps. We don’t need to make any modifications to our app before we test it.

Instrumentation Test Server: This is another app that will be installed and executed into the device.

The greatest benefit of the different architecture is that you can test your Android app without making any changes to the app. We need only singed application to run our scripts.

Setup and run applications:

  • Open command prompt from bin folder of Ruby2.0.0
  • Run calabash-android setup / Calabash-ios setup command.
  • Run calabash-android gen / calabash-ios gen command, It will generate features folder in bin.
  • For android app, Run calabash-android run <signed-apk file path>, it will install app on emulator and result us execution of script we given as part of my_first.feature file of features folder. (For ios app, run cucumber command will start test execution.)

Calabash Commands – Simple language:

For Login screen testing below are list of commands we need to run after setting up equivalent ruby commands in calabash_steps.rb.

/* Check alert message on invalid credentials*/
And I enter invalid username and valid password
When I press “Login”

/*Screen shots*/
Then take picture

/*Touch Label*/
Then I touch “acclabel”

Then I toggle switch

/*Entering text*/
Then I enter “ calabash” in to “acclabel” input field.

So overall CALABASH is simple to write commands and reduce lot of manual time for testing mobile applications.