Installing Appium with Ruby bindings – moving from Calabash – Part 1

If you read my blog you will know that my test automation tool of choice for mobile applications is Calabash using Ruby. However there is definitely a shift in the market towards Appium as the preferred tool of choice for mobile app testing and towards Java as the preferred language of choice for a Software Developer In Test (SDET).

Until now I have avoided Appium as my initial results with it a couple of years ago showed it to be “buggy” and somewhat unreliable – for example a test would execute successfully 9 times and then fail on the 10th attempt for no known reason…but maybe it’s time to give it a go again.

This post shows what I needed to do to get Appium with Ruby Bindings set up and running on my mac

 To Install Appium with Ruby Bindings

  1. Install the appium console
gem install --no-rdoc --no-ri appium_console

2.  Install the flaky gem (f you don’t already have it)

gem install --no-rdoc --no-ri flaky

3.  Do  a brew update (I’m assuming here that you already have brew installed, if not take a look at the calabash set up post https://webdevjourney.wordpress.com/2013/09/30/calasba-sh-for-testing-ios-apps-part-1/ to see how to install homebrew

brew update

[Note – if you get a HOMEBREW_CORE_FORMULA_REGEX error here – just run brew update again (it’s a known brew issue)

4. Upgrade nodesj as follows

brew upgrade node

5. Install grunt

npm install -g grunt grunt-cli

6. I am assuming that you have ant and maven already installed – you may want to upgrade them.

7. Clone the appium git repo

git clone git://github.com/appium/appium.git

8. Ensure you have an Xcode version greater than 4.6.3 installed. See this post for a quick way to check your version of Xcode from the command line: https://webdevjourney.wordpress.com/2015/10/15/find-your-xcode-version-using-terminal/

9. cd into your appium folder (from the repo clone that you did in step 7 and execute

./reset.sh

Note – I encountered a problem here – i had the following output:

* Configuring Android bootstrap
---- FAILURE: reset.sh exited with status 1 ----

Please see the following post on how to resolve this issue:

10. Finally run:

 grunt authorize

11. You are then ready to launch Appium by running:

node .

You will then see a message like this:

info: Welcome to Appium v1.4.13 (REV 96cfaef4aafa2693b4f0630b9d44ca7f0f6ed369)

In the next article I look at running the ruby console to query your app.

One thought on “Installing Appium with Ruby bindings – moving from Calabash – Part 1

Please leave a comment - any questions or feedback welcome.