SlideShare a Scribd company logo
1 of 36
Android & iOS automation using
Appium
Pre se nte r : Abhishe k Swain,
Mindfire So lutio ns
About Me:
Abhishek Swain, Software QA Engineer
Mindfire Solutions
Skills : Robotium , Appium , Selenium WebDriver , Maven , Junit , SQL ....
Certifications : ISTQB Foundation Level, V-Skills Selenium Certified
Connect Me :
Facebook : http://www.facebook.com/jikun55
LinkedIn : http://in.linkedin.com/pub/abhishek-swain/58/8a/829/
Contact Me :
Email : abhishek.swain@mindfiresolutions.com /mfsi.abhishek@gmail.com
Skype: mfsi_abhishekswain
Agenda
 Introduction
 Features List
 Current Limitations
 Understanding Architecture
 Automating Android Apps
 Native/ Hybrid app
 Mobile Web app
 Automating iOS Apps
 Prerequisites and configurations
 On Simulators
 On Real iDevices
 Short Demo
 Questions & Answers
Introduction
Appium is an Open source , Cross Platform test
automation tool for mobile apps
Hosted with GitHub
 Maintained by Dan Cuellar, Jonathan Lipps and
a number of other contributors
Supports automation of Native , Hybrid and
Mobile Web apps
Based on WebDriver JSON wire protocol
Based on Client-Server Architecture
Appium Server written in Node.js
Features
Automation support for
 iOS Mobile
 Android
 Firefox mobile OS
Cross-Platform
Features
Automation support for
 Native App
 Hybrid App
 Mobile Web App
Application Types
Features
 Supports all the WebDriver Client Libraries
 Java
 Ruby
 Python
 JavaScript
 PHP
 C#
Multiple Client Libraries
Features
 Common Library for all the mobile
platforms e.g. Android , iOS
 Selenium WebDriver Interfaces
implemented
 Added mobile specific functions
e.g. driver.pinch(), driver.zoom(), driver.currentActivity(),
driver.lock() etc.
 Common API for both Native and Web
components
Common API
Features
 Android
 Real Devices
 Emulators
 Native Browser
 Mobile Chrome
 iOS
 Real iDevices (e.g. iPhone, iPad etc.)
 Simulators
 Mobile Safari
Test Modalities
Limitations
 Android
 No Support for Toast messages
 Android Version 4.2+ required
 iOS
 Needs mac OSX 10.7+, lower versions
not supported
Architecture
 Client Server Architecture
 Based on WebDriver JSON Wire Protocol
 Native test libraries of respective platform is
the backbone of the backend
Architecture
 Android
 UiAutomator ( Version 4.2 or +)
 Default Backend for Android
 Selendroid ( Version 2.3+)
 A separate open source project for
Android automation
 Instrumentation is the Backend
 iOS
 Apple’s UIAutomation Framework
Which Native Library for Which Platform
Automation of Android Apps
Native & Hybrid Apps
Requirements : (Java)
 JAVA IDE (Eclipse)
 Java JDK
 Maven Plugin for Eclipse
 Selenium WebDriver Dependencies/Appium
Java-Client Dependency (Maven)
 Android SDK
 Junit
 Emulator/ Real Device
 Appium Server
 Node.js (If running appium from source)
Configurations:
 Environment Variables & Path Settings
 JAVA_HOME
 ANDROID_HOME
 MAVEN_HOME
 Android Platform Version 4.2+ must be
installed
Test Script Development :
 Create a maven project in Eclipse
 Add dependency
<dependency>
<groupId>io.appium</groupId>
<artifactId>java-client</artifactId>
<version>1.1.0</version>
</dependency>
Test Script Development :
public void setUp() throws Exception
{
File classpathRoot = new File(System.getProperty("user.dir"));
File appDir = new File(classpathRoot, "../../../apps/");
File app = new File(appDir, "App_Name.apk");
DesiredCapabilities capabilities = new DesiredCapabilities();
capabilities.setCapability("deviceName","Android");
capabilities.setCapability("browserName", "");
capabilities.setCapability("platformVersion", "4.4");
capabilities.setCapability("app", app.getAbsolutePath());
capabilities.setCapability("appPackage", “package_name ");
capabilities.setCapability("appActivity", ".activity_name");
driver = new AppiumDriver(new URL("http://127.0.0.1:4723/wd/hub"),
capabilities);
}
public void tearDown() throws Exception
{
driver.quit();
}
Starting Appium Server
From Source:
Install Node.js
Download Appium or Clone it using GitHub
In cmd navigate to node_modules/appium/bin
Run 'node appium [server arguments]'
From GUI Interface:
Do the configurations as needed from GUI
Click launch button to launch appium server
Appium Server Arguments
Usage : node appium [arguments](windows), appium & [arguments] (mac)
--app : To specify the path to the AUT(iOS: .app, android: apk)
-U , --udid : Unique device identifier of the connected physical device
-a, --address : IP Address to listen on
-p, --port : port to listen on
--session-override : Enables session override
--full-reset : (iOS) Delete the entire simulator folder. (Android) Reset
app state by uninstalling app instead of clearing app data. On
Android, this will also remove the app after the session is complete.
--no-reset : Don't reset app state between sessions
-l, --pre-launch : Pre-launch the application before allowing the first
session
Complete List :
https://github.com/appium/appium/blob/master/docs/en/server-args.md
Automation of Android Apps
Web Apps
Automating Web Apps
public void setUp() throws Exception
{
DesiredCapabilities capabilities = new DesiredCapabilities();
capabilities.setCapability("platformVersion", "4.4");
capabilities.setCapability("platformName","Android");
capabilities.setCapability("deviceName","Android Emulator");
capabilities.setCapability("browserName", "Browser or Chrome");
capabilities.setCapability("platformVersion", "4.4");
capabilities.setCapability("app", app.getAbsolutePath());
driver = new AppiumDriver(new URL("http://127.0.0.1:4723/wd/hub"),
capabilities);
}
Automating Web Apps
 Download Google Chrome(30+) in PC
 Navigate to ‘chrome://inspect’
 Connect device / Start Emulator
 Open the browser in the Device/Emulator and
navigate to the URL under test
 Click on inspect button on Chrome to get the
page source and inspect elements
How to get Locators?
Automation of iOS Apps
Requirements : (Java)
 Mac OS X 10.7+
 Xcode 4.6.3+
 iOS SDKs with Command Line Tools
 JAVA IDE (Eclipse)
 Java JDK
 Maven Plugin for Eclipse
 Selenium WebDriver Dependencies
 Junit
 Simulator/ Real Device
 Appium Server
 Node.js (If running appium from source)
Configurations:
 Environment Variables & Path Settings
 JAVA_HOME
 ANDROID_HOME
 MAVEN_HOME
 iOS SDKs with Command Line Tools
 Authorize the use of Instuments
 Sudo grunt authorize (If running from source)
 An alert prompts to do so if used GUI version of
Appium
Collecting the .app build of AUT
 Compile and Run the source code of AUT in
iOS Simulators
 Navigate to Library Application Support→ →
iPhone Simulator [version] Applications→ → →
[choose_folder_which_belongs_to_compiled_pro
ject] application_name.app→
Developing Test Scripts
public void setUp() throws Exception
{
File appDir = new File(System.getProperty("user.dir"), "../../../apps/");
File app = new File(appDir, “App_Name.app");
DesiredCapabilities capabilities = new DesiredCapabilities();
capabilities.setCapability("browserName", "");
capabilities.setCapability("platformVersion", "7.1");
capabilities.setCapability("platformName", "Mac");
capabilities.setCapability("deviceName", "iPhone Simulator");
capabilities.setCapability("app", app.getAbsolutePath());
driver = new AppiumDriver(new URL("http://127.0.0.1:4723/wd/hub"), capabilities);
}
public void tearDown() throws Exception
{
driver.quit();
}
Starting Appium Server
From Source:
From Terminal run the following commands
> brew install node # get node.js
> npm install -g appium # get appium
> npm install wd # get appium client
> appium & # start appium
From GUI Interface:
> Make required configurations from GUI
> Click Launch button to launch appium server
Running with Real Devices
 Specify device UDID with appium server
arguments or with the GUI version
 Compile source of AUT in debug mode
 AUT must be compiled with a Developers
Signature and a Developer Provisioning
profile(Not Distribution type)
 Device must be authorized as a development
device with xcode
 Specify Bundle ID with appium after installing
the ipa or running the AUT project directly to
device
Appium Server Capabilities
Complete List:
https://github.com/appium/appium/blob/master/docs/en/caps.md
Locating Elements
 By Class (UI component type)
E.g
UIATextField , UIAStaticText (iOS)
android.widget.Button ,
android.widget.EditText (Android)
 By Xpath (An abstract representation of certain
element with constraints)
 By Id
 Some of the Mobile JSON Wire Protocol Strategies
Accessibility ID (for iOS the accessibility identifier and for
Android the content-description)
Appium Inspector
 Inspect Elements and the element hierarchy with a
GUI interface
 Inspect the associated attributes of an element
 Easily identify the Xpath for all the elements
 Find the enable/disable status of an element
 Record test scripts and export in the desired language
 Verify mobile commands from Inspector before
implementation
www.mindfiresolutions.com
https://www.facebook.com/MindfireSolutions
http://www.linkedin.com/company/mindfire-solutions
http://twitter.com/mindfires
References
 appium.io
 github.com/appium/appium

More Related Content

What's hot

Appium: Automation for Mobile Apps
Appium: Automation for Mobile AppsAppium: Automation for Mobile Apps
Appium: Automation for Mobile AppsSauce Labs
 
Mobile Test Automation - Appium
Mobile Test Automation - AppiumMobile Test Automation - Appium
Mobile Test Automation - AppiumMaria Machlowska
 
Mobile Application Testing
Mobile Application TestingMobile Application Testing
Mobile Application TestingSWAAM Tech
 
Introduction To Mobile-Automation
Introduction To Mobile-AutomationIntroduction To Mobile-Automation
Introduction To Mobile-AutomationMindfire Solutions
 
Mobile application testing tutorial
Mobile application testing tutorialMobile application testing tutorial
Mobile application testing tutorialLokesh Agrawal
 
Introduction to mobile application development
Introduction to mobile application developmentIntroduction to mobile application development
Introduction to mobile application developmentChandan Maurya
 
Espresso testing
Espresso testingEspresso testing
Espresso testingvodqancr
 
Mobile application testing
Mobile application testingMobile application testing
Mobile application testingSoftheme
 
Mobile Application Testing by Javed Ansari
Mobile Application Testing by Javed AnsariMobile Application Testing by Javed Ansari
Mobile Application Testing by Javed AnsariJaved Ansari
 
Mobile automation using Appium
Mobile automation using AppiumMobile automation using Appium
Mobile automation using AppiumSaroj Singh
 
Mobile application testing
Mobile application testingMobile application testing
Mobile application testingvodQA
 
Introduction to Android development - Presentation
Introduction to Android development - PresentationIntroduction to Android development - Presentation
Introduction to Android development - PresentationAtul Panjwani
 
Automation testing on ios platform using appium
Automation testing on ios platform using appiumAutomation testing on ios platform using appium
Automation testing on ios platform using appiumAmbreen Khan
 
Mobile Application Testing Strategy
Mobile Application Testing StrategyMobile Application Testing Strategy
Mobile Application Testing StrategyankitQA
 
Selenium Presentation at Engineering Colleges
Selenium Presentation at Engineering CollegesSelenium Presentation at Engineering Colleges
Selenium Presentation at Engineering CollegesVijay Rangaiah
 
Mobile Application Development Services-MobileApptelligence
Mobile Application Development Services-MobileApptelligenceMobile Application Development Services-MobileApptelligence
Mobile Application Development Services-MobileApptelligenceMobileapptelligence
 

What's hot (20)

Appium: Automation for Mobile Apps
Appium: Automation for Mobile AppsAppium: Automation for Mobile Apps
Appium: Automation for Mobile Apps
 
Appium
AppiumAppium
Appium
 
Mobile Test Automation - Appium
Mobile Test Automation - AppiumMobile Test Automation - Appium
Mobile Test Automation - Appium
 
Appium
AppiumAppium
Appium
 
Mobile Application Testing
Mobile Application TestingMobile Application Testing
Mobile Application Testing
 
Introduction To Mobile-Automation
Introduction To Mobile-AutomationIntroduction To Mobile-Automation
Introduction To Mobile-Automation
 
Mobile application testing tutorial
Mobile application testing tutorialMobile application testing tutorial
Mobile application testing tutorial
 
Introduction to mobile application development
Introduction to mobile application developmentIntroduction to mobile application development
Introduction to mobile application development
 
Espresso testing
Espresso testingEspresso testing
Espresso testing
 
Mobile application testing
Mobile application testingMobile application testing
Mobile application testing
 
Mobile Application Testing by Javed Ansari
Mobile Application Testing by Javed AnsariMobile Application Testing by Javed Ansari
Mobile Application Testing by Javed Ansari
 
Mobile automation using Appium
Mobile automation using AppiumMobile automation using Appium
Mobile automation using Appium
 
Mobile application testing
Mobile application testingMobile application testing
Mobile application testing
 
Selenium ppt
Selenium pptSelenium ppt
Selenium ppt
 
Introduction to Android development - Presentation
Introduction to Android development - PresentationIntroduction to Android development - Presentation
Introduction to Android development - Presentation
 
Automation testing on ios platform using appium
Automation testing on ios platform using appiumAutomation testing on ios platform using appium
Automation testing on ios platform using appium
 
Mobile Application Testing Strategy
Mobile Application Testing StrategyMobile Application Testing Strategy
Mobile Application Testing Strategy
 
Appium vs Espresso and XCUI Test
Appium vs Espresso and XCUI TestAppium vs Espresso and XCUI Test
Appium vs Espresso and XCUI Test
 
Selenium Presentation at Engineering Colleges
Selenium Presentation at Engineering CollegesSelenium Presentation at Engineering Colleges
Selenium Presentation at Engineering Colleges
 
Mobile Application Development Services-MobileApptelligence
Mobile Application Development Services-MobileApptelligenceMobile Application Development Services-MobileApptelligence
Mobile Application Development Services-MobileApptelligence
 

Similar to Android & iOS Automation Using Appium

Android UI Testing with Appium
Android UI Testing with AppiumAndroid UI Testing with Appium
Android UI Testing with AppiumLuke Maung
 
QA Fest 2014. Ярослав Пернеровский. Appium - два в одном. рецепт приготовлени...
QA Fest 2014. Ярослав Пернеровский. Appium - два в одном. рецепт приготовлени...QA Fest 2014. Ярослав Пернеровский. Appium - два в одном. рецепт приготовлени...
QA Fest 2014. Ярослав Пернеровский. Appium - два в одном. рецепт приготовлени...QAFest
 
Appium understanding document
Appium understanding documentAppium understanding document
Appium understanding documentAkshay Pillay
 
Deploying applications to Cloud with Google App Engine
Deploying applications to Cloud with Google App EngineDeploying applications to Cloud with Google App Engine
Deploying applications to Cloud with Google App EngineAlexander Zamkovyi
 
Apache Cordova In Action
Apache Cordova In ActionApache Cordova In Action
Apache Cordova In ActionHazem Saleh
 
eXo Platform SEA - Play Framework Introduction
eXo Platform SEA - Play Framework IntroductioneXo Platform SEA - Play Framework Introduction
eXo Platform SEA - Play Framework Introductionvstorm83
 
Selenium, Appium, and Robots!
Selenium, Appium, and Robots!Selenium, Appium, and Robots!
Selenium, Appium, and Robots!hugs
 
Android Automation Using Robotium
Android Automation Using RobotiumAndroid Automation Using Robotium
Android Automation Using RobotiumMindfire Solutions
 
[JMaghreb 2014] Developing JavaScript Mobile Apps Using Apache Cordova
[JMaghreb 2014] Developing JavaScript Mobile Apps Using Apache Cordova[JMaghreb 2014] Developing JavaScript Mobile Apps Using Apache Cordova
[JMaghreb 2014] Developing JavaScript Mobile Apps Using Apache CordovaHazem Saleh
 
Comprehensive List of Open Source QA Tools
Comprehensive List of Open Source QA ToolsComprehensive List of Open Source QA Tools
Comprehensive List of Open Source QA ToolsAshish Bansal
 
Meteor Meet-up San Diego December 2014
Meteor Meet-up San Diego December 2014Meteor Meet-up San Diego December 2014
Meteor Meet-up San Diego December 2014Lou Sacco
 
WebAPIs & Apps - Mozilla London
WebAPIs & Apps - Mozilla LondonWebAPIs & Apps - Mozilla London
WebAPIs & Apps - Mozilla LondonRobert Nyman
 
Android studio
Android studioAndroid studio
Android studioAndri Yabu
 
Mobile Quality Night Vienna 2015 - Testobject Appium in der Cloud
Mobile Quality Night Vienna 2015 - Testobject Appium in der CloudMobile Quality Night Vienna 2015 - Testobject Appium in der Cloud
Mobile Quality Night Vienna 2015 - Testobject Appium in der CloudRudolf Grötz
 
Introduction to Apache Cordova (Phonegap)
Introduction to Apache Cordova (Phonegap)Introduction to Apache Cordova (Phonegap)
Introduction to Apache Cordova (Phonegap)ejlp12
 

Similar to Android & iOS Automation Using Appium (20)

Android CI and Appium
Android CI and AppiumAndroid CI and Appium
Android CI and Appium
 
Next level of Appium
Next level of AppiumNext level of Appium
Next level of Appium
 
Android UI Testing with Appium
Android UI Testing with AppiumAndroid UI Testing with Appium
Android UI Testing with Appium
 
Appium solution
Appium solutionAppium solution
Appium solution
 
QA Fest 2014. Ярослав Пернеровский. Appium - два в одном. рецепт приготовлени...
QA Fest 2014. Ярослав Пернеровский. Appium - два в одном. рецепт приготовлени...QA Fest 2014. Ярослав Пернеровский. Appium - два в одном. рецепт приготовлени...
QA Fest 2014. Ярослав Пернеровский. Appium - два в одном. рецепт приготовлени...
 
Appium understanding document
Appium understanding documentAppium understanding document
Appium understanding document
 
Appium solution artizone
Appium solution   artizoneAppium solution   artizone
Appium solution artizone
 
Deploying applications to Cloud with Google App Engine
Deploying applications to Cloud with Google App EngineDeploying applications to Cloud with Google App Engine
Deploying applications to Cloud with Google App Engine
 
Apache Cordova In Action
Apache Cordova In ActionApache Cordova In Action
Apache Cordova In Action
 
eXo Platform SEA - Play Framework Introduction
eXo Platform SEA - Play Framework IntroductioneXo Platform SEA - Play Framework Introduction
eXo Platform SEA - Play Framework Introduction
 
Selenium, Appium, and Robots!
Selenium, Appium, and Robots!Selenium, Appium, and Robots!
Selenium, Appium, and Robots!
 
Android Automation Using Robotium
Android Automation Using RobotiumAndroid Automation Using Robotium
Android Automation Using Robotium
 
[JMaghreb 2014] Developing JavaScript Mobile Apps Using Apache Cordova
[JMaghreb 2014] Developing JavaScript Mobile Apps Using Apache Cordova[JMaghreb 2014] Developing JavaScript Mobile Apps Using Apache Cordova
[JMaghreb 2014] Developing JavaScript Mobile Apps Using Apache Cordova
 
Comprehensive List of Open Source QA Tools
Comprehensive List of Open Source QA ToolsComprehensive List of Open Source QA Tools
Comprehensive List of Open Source QA Tools
 
Meteor Meet-up San Diego December 2014
Meteor Meet-up San Diego December 2014Meteor Meet-up San Diego December 2014
Meteor Meet-up San Diego December 2014
 
WebAPIs & Apps - Mozilla London
WebAPIs & Apps - Mozilla LondonWebAPIs & Apps - Mozilla London
WebAPIs & Apps - Mozilla London
 
Browser_Stack_Intro
Browser_Stack_IntroBrowser_Stack_Intro
Browser_Stack_Intro
 
Android studio
Android studioAndroid studio
Android studio
 
Mobile Quality Night Vienna 2015 - Testobject Appium in der Cloud
Mobile Quality Night Vienna 2015 - Testobject Appium in der CloudMobile Quality Night Vienna 2015 - Testobject Appium in der Cloud
Mobile Quality Night Vienna 2015 - Testobject Appium in der Cloud
 
Introduction to Apache Cordova (Phonegap)
Introduction to Apache Cordova (Phonegap)Introduction to Apache Cordova (Phonegap)
Introduction to Apache Cordova (Phonegap)
 

More from Mindfire Solutions (20)

Physician Search and Review
Physician Search and ReviewPhysician Search and Review
Physician Search and Review
 
diet management app
diet management appdiet management app
diet management app
 
Business Technology Solution
Business Technology SolutionBusiness Technology Solution
Business Technology Solution
 
Remote Health Monitoring
Remote Health MonitoringRemote Health Monitoring
Remote Health Monitoring
 
Influencer Marketing Solution
Influencer Marketing SolutionInfluencer Marketing Solution
Influencer Marketing Solution
 
ELMAH
ELMAHELMAH
ELMAH
 
High Availability of Azure Applications
High Availability of Azure ApplicationsHigh Availability of Azure Applications
High Availability of Azure Applications
 
IOT Hands On
IOT Hands OnIOT Hands On
IOT Hands On
 
Glimpse of Loops Vs Set
Glimpse of Loops Vs SetGlimpse of Loops Vs Set
Glimpse of Loops Vs Set
 
Oracle Sql Developer-Getting Started
Oracle Sql Developer-Getting StartedOracle Sql Developer-Getting Started
Oracle Sql Developer-Getting Started
 
Adaptive Layout In iOS 8
Adaptive Layout In iOS 8Adaptive Layout In iOS 8
Adaptive Layout In iOS 8
 
Introduction to Auto-layout : iOS/Mac
Introduction to Auto-layout : iOS/MacIntroduction to Auto-layout : iOS/Mac
Introduction to Auto-layout : iOS/Mac
 
LINQPad - utility Tool
LINQPad - utility ToolLINQPad - utility Tool
LINQPad - utility Tool
 
Get started with watch kit development
Get started with watch kit developmentGet started with watch kit development
Get started with watch kit development
 
Swift vs Objective-C
Swift vs Objective-CSwift vs Objective-C
Swift vs Objective-C
 
Material Design in Android
Material Design in AndroidMaterial Design in Android
Material Design in Android
 
Introduction to OData
Introduction to ODataIntroduction to OData
Introduction to OData
 
Ext js Part 2- MVC
Ext js Part 2- MVCExt js Part 2- MVC
Ext js Part 2- MVC
 
ExtJs Basic Part-1
ExtJs Basic Part-1ExtJs Basic Part-1
ExtJs Basic Part-1
 
Spring Security Introduction
Spring Security IntroductionSpring Security Introduction
Spring Security Introduction
 

Recently uploaded

Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsArshad QA
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxbodapatigopi8531
 
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionSolGuruz
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...kellynguyen01
 
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female serviceCALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female serviceanilsa9823
 
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...OnePlan Solutions
 
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️anilsa9823
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerThousandEyes
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Modelsaagamshah0812
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...Health
 
How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsAndolasoft Inc
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsAlberto González Trastoy
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...harshavardhanraghave
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...ICS
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Steffen Staab
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfkalichargn70th171
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsJhone kinadey
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxComplianceQuest1
 

Recently uploaded (20)

Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview Questions
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptx
 
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with Precision
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
 
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female serviceCALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
 
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
 
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Models
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
 
How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.js
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
 
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
 
Microsoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdfMicrosoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdf
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial Goals
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docx
 

Android & iOS Automation Using Appium

  • 1. Android & iOS automation using Appium Pre se nte r : Abhishe k Swain, Mindfire So lutio ns
  • 2. About Me: Abhishek Swain, Software QA Engineer Mindfire Solutions Skills : Robotium , Appium , Selenium WebDriver , Maven , Junit , SQL .... Certifications : ISTQB Foundation Level, V-Skills Selenium Certified Connect Me : Facebook : http://www.facebook.com/jikun55 LinkedIn : http://in.linkedin.com/pub/abhishek-swain/58/8a/829/ Contact Me : Email : abhishek.swain@mindfiresolutions.com /mfsi.abhishek@gmail.com Skype: mfsi_abhishekswain
  • 3. Agenda  Introduction  Features List  Current Limitations  Understanding Architecture  Automating Android Apps  Native/ Hybrid app  Mobile Web app  Automating iOS Apps  Prerequisites and configurations  On Simulators  On Real iDevices  Short Demo  Questions & Answers
  • 4. Introduction Appium is an Open source , Cross Platform test automation tool for mobile apps Hosted with GitHub  Maintained by Dan Cuellar, Jonathan Lipps and a number of other contributors Supports automation of Native , Hybrid and Mobile Web apps Based on WebDriver JSON wire protocol Based on Client-Server Architecture Appium Server written in Node.js
  • 5. Features Automation support for  iOS Mobile  Android  Firefox mobile OS Cross-Platform
  • 6. Features Automation support for  Native App  Hybrid App  Mobile Web App Application Types
  • 7. Features  Supports all the WebDriver Client Libraries  Java  Ruby  Python  JavaScript  PHP  C# Multiple Client Libraries
  • 8. Features  Common Library for all the mobile platforms e.g. Android , iOS  Selenium WebDriver Interfaces implemented  Added mobile specific functions e.g. driver.pinch(), driver.zoom(), driver.currentActivity(), driver.lock() etc.  Common API for both Native and Web components Common API
  • 9. Features  Android  Real Devices  Emulators  Native Browser  Mobile Chrome  iOS  Real iDevices (e.g. iPhone, iPad etc.)  Simulators  Mobile Safari Test Modalities
  • 10. Limitations  Android  No Support for Toast messages  Android Version 4.2+ required  iOS  Needs mac OSX 10.7+, lower versions not supported
  • 11. Architecture  Client Server Architecture  Based on WebDriver JSON Wire Protocol  Native test libraries of respective platform is the backbone of the backend
  • 12. Architecture  Android  UiAutomator ( Version 4.2 or +)  Default Backend for Android  Selendroid ( Version 2.3+)  A separate open source project for Android automation  Instrumentation is the Backend  iOS  Apple’s UIAutomation Framework Which Native Library for Which Platform
  • 13. Automation of Android Apps Native & Hybrid Apps
  • 14. Requirements : (Java)  JAVA IDE (Eclipse)  Java JDK  Maven Plugin for Eclipse  Selenium WebDriver Dependencies/Appium Java-Client Dependency (Maven)  Android SDK  Junit  Emulator/ Real Device  Appium Server  Node.js (If running appium from source)
  • 15. Configurations:  Environment Variables & Path Settings  JAVA_HOME  ANDROID_HOME  MAVEN_HOME  Android Platform Version 4.2+ must be installed
  • 16. Test Script Development :  Create a maven project in Eclipse  Add dependency <dependency> <groupId>io.appium</groupId> <artifactId>java-client</artifactId> <version>1.1.0</version> </dependency>
  • 17. Test Script Development : public void setUp() throws Exception { File classpathRoot = new File(System.getProperty("user.dir")); File appDir = new File(classpathRoot, "../../../apps/"); File app = new File(appDir, "App_Name.apk"); DesiredCapabilities capabilities = new DesiredCapabilities(); capabilities.setCapability("deviceName","Android"); capabilities.setCapability("browserName", ""); capabilities.setCapability("platformVersion", "4.4"); capabilities.setCapability("app", app.getAbsolutePath()); capabilities.setCapability("appPackage", “package_name "); capabilities.setCapability("appActivity", ".activity_name"); driver = new AppiumDriver(new URL("http://127.0.0.1:4723/wd/hub"), capabilities); } public void tearDown() throws Exception { driver.quit(); }
  • 18. Starting Appium Server From Source: Install Node.js Download Appium or Clone it using GitHub In cmd navigate to node_modules/appium/bin Run 'node appium [server arguments]' From GUI Interface: Do the configurations as needed from GUI Click launch button to launch appium server
  • 19. Appium Server Arguments Usage : node appium [arguments](windows), appium & [arguments] (mac) --app : To specify the path to the AUT(iOS: .app, android: apk) -U , --udid : Unique device identifier of the connected physical device -a, --address : IP Address to listen on -p, --port : port to listen on --session-override : Enables session override --full-reset : (iOS) Delete the entire simulator folder. (Android) Reset app state by uninstalling app instead of clearing app data. On Android, this will also remove the app after the session is complete. --no-reset : Don't reset app state between sessions -l, --pre-launch : Pre-launch the application before allowing the first session Complete List : https://github.com/appium/appium/blob/master/docs/en/server-args.md
  • 20. Automation of Android Apps Web Apps
  • 21. Automating Web Apps public void setUp() throws Exception { DesiredCapabilities capabilities = new DesiredCapabilities(); capabilities.setCapability("platformVersion", "4.4"); capabilities.setCapability("platformName","Android"); capabilities.setCapability("deviceName","Android Emulator"); capabilities.setCapability("browserName", "Browser or Chrome"); capabilities.setCapability("platformVersion", "4.4"); capabilities.setCapability("app", app.getAbsolutePath()); driver = new AppiumDriver(new URL("http://127.0.0.1:4723/wd/hub"), capabilities); }
  • 22. Automating Web Apps  Download Google Chrome(30+) in PC  Navigate to ‘chrome://inspect’  Connect device / Start Emulator  Open the browser in the Device/Emulator and navigate to the URL under test  Click on inspect button on Chrome to get the page source and inspect elements How to get Locators?
  • 24. Requirements : (Java)  Mac OS X 10.7+  Xcode 4.6.3+  iOS SDKs with Command Line Tools  JAVA IDE (Eclipse)  Java JDK  Maven Plugin for Eclipse  Selenium WebDriver Dependencies  Junit  Simulator/ Real Device  Appium Server  Node.js (If running appium from source)
  • 25. Configurations:  Environment Variables & Path Settings  JAVA_HOME  ANDROID_HOME  MAVEN_HOME  iOS SDKs with Command Line Tools  Authorize the use of Instuments  Sudo grunt authorize (If running from source)  An alert prompts to do so if used GUI version of Appium
  • 26. Collecting the .app build of AUT  Compile and Run the source code of AUT in iOS Simulators  Navigate to Library Application Support→ → iPhone Simulator [version] Applications→ → → [choose_folder_which_belongs_to_compiled_pro ject] application_name.app→
  • 27. Developing Test Scripts public void setUp() throws Exception { File appDir = new File(System.getProperty("user.dir"), "../../../apps/"); File app = new File(appDir, “App_Name.app"); DesiredCapabilities capabilities = new DesiredCapabilities(); capabilities.setCapability("browserName", ""); capabilities.setCapability("platformVersion", "7.1"); capabilities.setCapability("platformName", "Mac"); capabilities.setCapability("deviceName", "iPhone Simulator"); capabilities.setCapability("app", app.getAbsolutePath()); driver = new AppiumDriver(new URL("http://127.0.0.1:4723/wd/hub"), capabilities); } public void tearDown() throws Exception { driver.quit(); }
  • 28. Starting Appium Server From Source: From Terminal run the following commands > brew install node # get node.js > npm install -g appium # get appium > npm install wd # get appium client > appium & # start appium From GUI Interface: > Make required configurations from GUI > Click Launch button to launch appium server
  • 29. Running with Real Devices  Specify device UDID with appium server arguments or with the GUI version  Compile source of AUT in debug mode  AUT must be compiled with a Developers Signature and a Developer Provisioning profile(Not Distribution type)  Device must be authorized as a development device with xcode  Specify Bundle ID with appium after installing the ipa or running the AUT project directly to device
  • 30. Appium Server Capabilities Complete List: https://github.com/appium/appium/blob/master/docs/en/caps.md
  • 31. Locating Elements  By Class (UI component type) E.g UIATextField , UIAStaticText (iOS) android.widget.Button , android.widget.EditText (Android)  By Xpath (An abstract representation of certain element with constraints)  By Id  Some of the Mobile JSON Wire Protocol Strategies Accessibility ID (for iOS the accessibility identifier and for Android the content-description)
  • 32. Appium Inspector  Inspect Elements and the element hierarchy with a GUI interface  Inspect the associated attributes of an element  Easily identify the Xpath for all the elements  Find the enable/disable status of an element  Record test scripts and export in the desired language  Verify mobile commands from Inspector before implementation
  • 33.
  • 34.