BDD iOSDev

Adventures with iOS Automation using Appium on OSX and iOS

Appium on OSX Yosemite

OSX Yosemite is going to be released soon with Xcode 6 and iOS8 support. I have installed latest public beta version of the OSX Yosemite. Just given a try to setup Appium to see if it supports iOS8.

Requirements

  • Mac OSX with Yosemite 
  • Xcode 6
  • Ruby-Cucumber
  • NodeJS
  • BDDfire [Optional]

Setup

I will be using Ruby-Cucumber-Capybara framework with Appium, I have writen and Gem called ‘BDDfire‘ to setup framework in a minute.

BDDfire

We can crreate a project directory and install framework

Now we have all the directory setup for appium with all capybara and cucumber.

bddfire

Install RubyGems

Now we will ruby 1.9.3 and install all the gems from the Gemfile

It looks like this

install_gems

 

Install Node and Start Appium

BDDfire has created ‘package.json’ with Appium dependency in it. We will update it with latest version of the Appium [1.3.0beta1] and install node packages and start Appium server

This will start Appium server on port 4723

npm_appium

 Run Cucumber with Appium

BDDfire has a cucumber profile ‘appium_ios’ to run cucumber scenarios with Appium. Capybara driver configuration looks like this

 

We can run cucumber like this

Appium and iOS8

Appium support for iOS8 is still progress, you can watch this GitHub thread. Now we will see some of the basic issues you will face and possible solutions.

Automation Trace Error

Xcode 6 has not AuomationInstrument.bundle directory so you probably see this error.

automation_trace_error

Solution to this is copy all content from AutomationIntrument.xrplugin to newly created AutomationInstrument bundle

solution-automation_trace

 

Instrument Error

Sometimes, you will see an error

This is unsolved error and we will hopefully get solution to this issue to work on iPhone Simulator soon.

The Xcode6 launch the Simulator but stucks

iOS-Simulator

 You can fing source code on GitHub

Watch YouTube video demo

In the next post, I will try it from my iPhone 6 real device and see if it works.

Thanks a lot to all @AppiumDevs for all your support.