UI Automation: Calabash installation

So I’ve ventured into the world of UI automation and I’ve decided to give Calabash a try. I chose Calabash for a number of reasons:

  • Easy setup
  • Nice syntax (B.D.D. approach)
  • Cross-platform (although I’m only using it for Android at the moment)

I first heard of Calabash at Droidcon UK during a UI testing talk by a guy from Facebook’s Android test tool team. They weren’t using it, but when the crowd was asked what they use, Calabash was in the majority. I also attended a talk on Calabash recently so I really had no excuse not to try it out.

I said one of the reason’s I chose Calabash was due to its ease of setup and while this is true, I found it somewhat difficult to find up-to-date resources relating to Android Calabash testing.  So what you’ll find here is my experience and I’ll also provide links to useful resources that helped me to get up and running. So thats enough background, lets get to the code!


Installation was pretty straight-forward. I followed the guide found here for Mac installation. I’m running Yosemite and everything worked a treat. Oh, and did you know Ruby comes preinstalled on Mac? I didn’t! To check what version you’re running just open a terminal and enter:

ruby --version

Ok so once you’ve got Calabash installed, you need to create a Calabash project. If you already have a Android project set up, I recommend putting creating a folder called “ui-automation” in the top level directory of your project and it include it with your source control. You’re project structure should look something like this:

–  mobile
–  wear
–  ui-automation

Next open up a terminal and cd to your “ui-automation” folder. Once you’re in that folder run the following command to allow Calabash generate a sample project for you:

calabash-android gen

That’s it! You should now be fully set up to start actually writing tests.

Share This

Leave a Reply