Recipe 29Test Android Apps with Calabash

Problem

You want to test an Android application using Cucumber.

Ingredients

  • Calabash,[185] an open source library for testing mobile apps

  • The Android SDK[186] for building and running the example application

  • Eclipse[187] for sketching the user interface

Solution

Calabash is a library that connects Cucumber to Android or iOS apps. The Android flavor works by embedding a TCP server into your application and then controlling it remotely from your computer using the Robotium GUI automation tool.[188]

In this recipe, we’ll write a simple bookmarking application and test it with Calabash. You can perform the tasks either in Eclipse or on the command line; we’ll show Eclipse here.

Setup

To build and run the example ...

Get Cucumber Recipes now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.