2. Document Revision History:
Version Date Revised By Comments
1 27/11/14 Amit Dewan Initial Version
2 29/01/15 Amit Dewan Remake version
Page 2 October 15, 2015
3. Contents
• Appium working on iOS
• Requirements
• Install Appium Server
• Install ios Webkit Debug Proxy
• SafariLauncher app
• Ios Device
• Xcode and Command Line Utilities
• Eclipse IDE
• Java ANT Project
• Package Structure
• Steps to run the framework
• Running the project from Jenkins
Appium working on iOS
Appium is an open source test automation tool developed and supported by Sauce Labs to automate native
Page 3 October 15, 2015
4. and hybrid mobile apps. It uses JSON wire protocol internally to interact with iOS web and native apps
using the Selenium WebDriver Appium server is written in Node.js and talks to iOS using UIAutomation
via Instruments
Workflow Diagram
Requirements
(1) Mac m/c (details: OSX10.7.5, JDK:1.7)
(2) appium-0.12.3.dmg
(3) ios-webkit-debug-proxy-master.zip
(4) Eclipse IDE
(5) selenium-server-standalone-2.35.0.jar
(6) TestNG
(7) ANT
(8) Jenkins with Tomcat server.
(9) SafariLauncher app on m/c
(10) Any ios device (provisioned with SafariLauncher app)
(11) Xcode and Command Line Utilities
Install Appium Server
Install Appium server from appium-0.12.3.dmg on mac machine.
Configurations on Appium server:
Set IP Address, port, Safari Launcher App path and UDID of the device.
See the following figure and set all the configurations exactly as shown.
Replace the app path with the SafariLauncher path placed in your computer and replace the UDID of the
Page 4 October 15, 2015
5. device with UDID of your device.
Appium Configuration
In Appium Preferences, uncheck Prelaunch Application
Install ios Webkit Debug Proxy
Extrract ios-webkit-debug-proxy-master.zip in any suitable location.
Folder with name “ios-webkit-debug-proxy” will be created with src directory in it.
SafariLauncher app
This app is used to launch safari browser on ios device with 30 seconds delay.
App needs to be installed on the device to be tested.
App's app file path also needs to be given to appium server.
Ios Device
iOS device which needs to be tested should be provisoned from Apple's portal.
With SafariLauncher app installed on the device, it is ready to be tested for Appium automation tests.
Xcode and Command Line Utilities
Xcode, Instruments and other utilities should be installed on the machine.
Command Line Utilities of xcode should be turned on.
Eclipse IDE
• Create Java ANT project on JDK 1.7
• Create subversion repository.
ANT Project
• Create ANT project with build.xml
• In build.xml, set dependencies for TestNG, selenium-server and java-tools.
Page 5 October 15, 2015
6. • In build.xml set target for running java main class
• Create “suite” folder to place all TestNG suites.
• Create “TestResults” folder to store all results.
• Create “config” folder to place framework properties file “config.properties”
Folder Structure in eclipse
Package Structure
➔ test package: starts with qas and ends with test
This package contains all the TestNG test scripts.
➔ controls package:starts with qas.webdriver and ends with controls
This package includes all controls available on device screen like TextField, button etc.
➔ driver package: starts with qas.webdriver and ends with driver
This package contains driver and utilities class needed to run whole framework.
➔ executor package:starts with qas.webdriver and ends with executor
This package has java main class which drives the whole framework.
➔ pages package: starts with qas.webdriver and ends with pages
This package has various pages corresponding to screens in the mobile app.
➔ testdata package: starts with qas.webdriver and ends with testdata
This package has separate properties files with testdata for each TestNG class.
Steps to run the framework
➔ Start webkit-proxy by issung command:
Page 6 October 15, 2015
7. ios_webkit_debug_proxy -c <UDID>:27753 -d
Replace UDID with your device UDID
22753 is the port where webkit-proxy will start.
For example command becomes
==>ios_webkit_debug_proxy -c 19d175af0d583250570695b1949e1bdc7241505c:27753 -d
➔ Start appium server by hitting Launch button.
Note that “Prelaunch Application” in Appium Preferences should be unchecked.
➔ Run and build the appium Project by right clicking ANT build.xml in eclipse and selecting “RunAs”
option as ANT build.
Running the project from Jenkins
➔ Start Jenkins.
➔ Create free style job.
➔ Set up SVN configuration and provide the path of maven project.
➔ Add “Execute Shell” build step.
➔ In build step add ANT and set target as “main”
➔ Set email recipients and subject.
➔ Save the configuration.
➔ Build the project.
Page 7 October 15, 2015