Friday, January 23, 2015

Appium Setup on Mac OS



Requirement:
Automation test framework for native/hybrid/web Android & iOS application.

Solution: Appium
  1. Installation
    1. Homebrew
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
    1. Node
brew install node      # get node.js
    1. Appium Node npm
npm install -g appium  # get appium
    1. Appium Client
npm install wd         # get appium client
    1. Test Appium Instalation:
> appium
info: Welcome to Appium v1.3.4 (REV c8c79a85fbd6870cd6fc3d66d038a115ebe22efe)
info: Appium REST http interface listener started on 0.0.0.0:4723
info: Console LogLevel: debug
Press CTRL + C to stop Appium.
    1. Install Android SDK for Android Application Tests
SDK Tools Only
Download and unzip it in desired location, in my case it is:
/Users/vbragaru/dev/android/android-sdk-macosx
After that we need to add them to $PATH just run in Terminal:
nano ~/.bash_profile
Our bash profile should look like this:
export ANDROID_HOME=/Users/gmunteanu/dev/android/android-sdk-macosx
export PATH=$ANDROID_HOME/platform-tools:$PATH
export PATH=$ANDROID_HOME/tools:$PATH
export JAVA_HOME=$(/usr/libexec/java_home -v 1.6)
export PATH=/usr/local/bin:$PATH
Press CTRL+O then CTRL+X
Run next command in Terminal to read configurations:
source ~/.bash_profile
Android SDK Tools need some additional packages to be installed, run in Terminal:
android
We have to install green selected packages and optionally orange selected API for device API level to be tested.
    1. Install xCode Command Line Tools for iOS Application Tests
Type in Terminal:
gcc
You’ll see an alert box:
alert Xcode Command Line Tools is required
Click Install and we’re done with xCode command line tools.
Next we have to install ideviceintaller which Appium use to install the .IPA file to device. Run in Terminal:
brew install -v --devel --fresh  automake autoconf libtool wget libimobiledevice

brew install -v --HEAD --fresh --build-from-source ideviceinstaller

    1. Check Appium Installation:
Just run in Terminal:
appium-doctor
You should see the following logs:

No comments:

Post a Comment