SlideShare ist ein Scribd-Unternehmen logo
1 von 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

Weitere ähnliche Inhalte

Was ist angesagt?

Automation Testing With Appium
Automation Testing With AppiumAutomation Testing With Appium
Automation Testing With AppiumKnoldus Inc.
 
Mobile Testing with Appium
Mobile Testing with AppiumMobile Testing with Appium
Mobile Testing with AppiumKnoldus Inc.
 
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
 
Introduction To Mobile-Automation
Introduction To Mobile-AutomationIntroduction To Mobile-Automation
Introduction To Mobile-AutomationMindfire Solutions
 
Appium an introduction
Appium   an introductionAppium   an introduction
Appium an introductionVivek Shringi
 
Appium Architecture | How Appium Works | Edureka
Appium Architecture | How Appium Works | EdurekaAppium Architecture | How Appium Works | Edureka
Appium Architecture | How Appium Works | EdurekaEdureka!
 
Appium, Test-Driven Development, and Continuous Integration
Appium, Test-Driven Development, and Continuous IntegrationAppium, Test-Driven Development, and Continuous Integration
Appium, Test-Driven Development, and Continuous IntegrationTechWell
 
Mobile Application Testing
Mobile Application TestingMobile Application Testing
Mobile Application TestingSWAAM Tech
 
Mobile Application Testing Training Presentation
Mobile Application Testing Training PresentationMobile Application Testing Training Presentation
Mobile Application Testing Training PresentationMobiGnosis
 
Mobile Application Testing by Javed Ansari
Mobile Application Testing by Javed AnsariMobile Application Testing by Javed Ansari
Mobile Application Testing by Javed AnsariJaved Ansari
 
Ship quality mobile apps with speed [Webinar]
Ship quality mobile apps with speed [Webinar]Ship quality mobile apps with speed [Webinar]
Ship quality mobile apps with speed [Webinar]BrowserStack
 
An Introduction To Automated API Testing
An Introduction To Automated API TestingAn Introduction To Automated API Testing
An Introduction To Automated API TestingSauce Labs
 

Was ist angesagt? (20)

Appium
AppiumAppium
Appium
 
Automation Testing With Appium
Automation Testing With AppiumAutomation Testing With Appium
Automation Testing With Appium
 
Appium
AppiumAppium
Appium
 
Appium solution
Appium solutionAppium solution
Appium solution
 
Appium overview
Appium overviewAppium overview
Appium overview
 
Mobile Testing with Appium
Mobile Testing with AppiumMobile Testing with Appium
Mobile Testing with Appium
 
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
 
Introduction To Mobile-Automation
Introduction To Mobile-AutomationIntroduction To Mobile-Automation
Introduction To Mobile-Automation
 
Appium an introduction
Appium   an introductionAppium   an introduction
Appium an introduction
 
Appium Architecture | How Appium Works | Edureka
Appium Architecture | How Appium Works | EdurekaAppium Architecture | How Appium Works | Edureka
Appium Architecture | How Appium Works | Edureka
 
Browser_Stack_Intro
Browser_Stack_IntroBrowser_Stack_Intro
Browser_Stack_Intro
 
Appium, Test-Driven Development, and Continuous Integration
Appium, Test-Driven Development, and Continuous IntegrationAppium, Test-Driven Development, and Continuous Integration
Appium, Test-Driven Development, and Continuous Integration
 
Introducing AWS Device Farm
Introducing AWS Device FarmIntroducing AWS Device Farm
Introducing AWS Device Farm
 
Mobile Application Testing
Mobile Application TestingMobile Application Testing
Mobile Application Testing
 
Mobile Application Testing Training Presentation
Mobile Application Testing Training PresentationMobile Application Testing Training Presentation
Mobile Application Testing Training Presentation
 
Mobile Application Testing by Javed Ansari
Mobile Application Testing by Javed AnsariMobile Application Testing by Javed Ansari
Mobile Application Testing by Javed Ansari
 
Automation using Appium
Automation using AppiumAutomation using Appium
Automation using Appium
 
Ship quality mobile apps with speed [Webinar]
Ship quality mobile apps with speed [Webinar]Ship quality mobile apps with speed [Webinar]
Ship quality mobile apps with speed [Webinar]
 
Cypress Automation
Cypress  AutomationCypress  Automation
Cypress Automation
 
An Introduction To Automated API Testing
An Introduction To Automated API TestingAn Introduction To Automated API Testing
An Introduction To Automated API Testing
 

Ähnlich wie 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
 
Mobile automation using Appium
Mobile automation using AppiumMobile automation using Appium
Mobile automation using AppiumSaroj Singh
 
Introduction to Apache Cordova (Phonegap)
Introduction to Apache Cordova (Phonegap)Introduction to Apache Cordova (Phonegap)
Introduction to Apache Cordova (Phonegap)ejlp12
 
Web APIs & Apps - Mozilla
Web APIs & Apps - MozillaWeb APIs & Apps - Mozilla
Web APIs & Apps - MozillaRobert Nyman
 

Ähnlich wie 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
 
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
 
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
 
Mobile automation using Appium
Mobile automation using AppiumMobile automation using Appium
Mobile automation using Appium
 
Introduction to Apache Cordova (Phonegap)
Introduction to Apache Cordova (Phonegap)Introduction to Apache Cordova (Phonegap)
Introduction to Apache Cordova (Phonegap)
 
Web APIs & Apps - Mozilla
Web APIs & Apps - MozillaWeb APIs & Apps - Mozilla
Web APIs & Apps - Mozilla
 

Mehr von 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
 

Kürzlich hochgeladen

MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...Jittipong Loespradit
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️Delhi Call girls
 
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdfintroduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdfVishalKumarJha10
 
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...kalichargn70th171
 
%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrandmasabamasaba
 
Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) SolutionIntroducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) SolutionOnePlan Solutions
 
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
 
Pharm-D Biostatistics and Research methodology
Pharm-D Biostatistics and Research methodologyPharm-D Biostatistics and Research methodology
Pharm-D Biostatistics and Research methodologyAnusha Are
 
Chinsurah Escorts ☎️8617697112 Starting From 5K to 15K High Profile Escorts ...
Chinsurah Escorts ☎️8617697112  Starting From 5K to 15K High Profile Escorts ...Chinsurah Escorts ☎️8617697112  Starting From 5K to 15K High Profile Escorts ...
Chinsurah Escorts ☎️8617697112 Starting From 5K to 15K High Profile Escorts ...Nitya salvi
 
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park %in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park masabamasaba
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...panagenda
 
Exploring the Best Video Editing App.pdf
Exploring the Best Video Editing App.pdfExploring the Best Video Editing App.pdf
Exploring the Best Video Editing App.pdfproinshot.com
 
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesAI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesVictorSzoltysek
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️Delhi Call girls
 
LEVEL 5 - SESSION 1 2023 (1).pptx - PDF 123456
LEVEL 5   - SESSION 1 2023 (1).pptx - PDF 123456LEVEL 5   - SESSION 1 2023 (1).pptx - PDF 123456
LEVEL 5 - SESSION 1 2023 (1).pptx - PDF 123456KiaraTiradoMicha
 
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfonteinmasabamasaba
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providermohitmore19
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comFatema Valibhai
 
The title is not connected to what is inside
The title is not connected to what is insideThe title is not connected to what is inside
The title is not connected to what is insideshinachiaurasa2
 

Kürzlich hochgeladen (20)

MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdfintroduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
 
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
 
%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand
 
Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) SolutionIntroducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
 
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...
 
Pharm-D Biostatistics and Research methodology
Pharm-D Biostatistics and Research methodologyPharm-D Biostatistics and Research methodology
Pharm-D Biostatistics and Research methodology
 
Chinsurah Escorts ☎️8617697112 Starting From 5K to 15K High Profile Escorts ...
Chinsurah Escorts ☎️8617697112  Starting From 5K to 15K High Profile Escorts ...Chinsurah Escorts ☎️8617697112  Starting From 5K to 15K High Profile Escorts ...
Chinsurah Escorts ☎️8617697112 Starting From 5K to 15K High Profile Escorts ...
 
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
 
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park %in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
 
Exploring the Best Video Editing App.pdf
Exploring the Best Video Editing App.pdfExploring the Best Video Editing App.pdf
Exploring the Best Video Editing App.pdf
 
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesAI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
LEVEL 5 - SESSION 1 2023 (1).pptx - PDF 123456
LEVEL 5   - SESSION 1 2023 (1).pptx - PDF 123456LEVEL 5   - SESSION 1 2023 (1).pptx - PDF 123456
LEVEL 5 - SESSION 1 2023 (1).pptx - PDF 123456
 
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.com
 
The title is not connected to what is inside
The title is not connected to what is insideThe title is not connected to what is inside
The title is not connected to what is inside
 

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.