Mobile Automation
Android & IOS
Harikrishna Recharla
Overview
Requirement
Setup
Inspecting Developer Code
Running Sample Script
Framework Hierarchy
Cloud Paltform
Requirement:Android:
● JAVA-JDK & JRE (1.5 and Above).
● Android SDK.
● Appium Server.
● Adb Driver
● Android Device.
IOS:
● Mac Operating System
● Xcode
● Appium Server
● Appium Inspector
● Ios Divice.
● WebDriver Agent.
Setup:
● Install All Required Softwares.
● Set Environment variable path for (JDK,JRE,Android SDK,Appium,Maven)
● Enable Developer Mode in Device Before Connecting to PC.
● Connect Android Device And check using (adb devices) & for IOS (instruments -s
devices)
● We Can access using Wifi Debugging also.
Appium Setup:
● Default Viewer of
Appium.
● Both Android and IOS
can be configured at
same time.
● It can be Manually
started and Stopped.
Appium Settings:
● Set Server Address and
Port Number,Which
will locally create
Server and Assign port
Number.
● This Intermediator
Bridge to connect to
PC and Device.
Android Settings:
● Select Platform Name
and Automation Name.
● App path is not
Mandatory, We specify
in code level to access
device apk.
IOS Settings:
● App Path: Set Archived
Xcode Path.
● Set Platform Version.
Running Appium from CMD or Terminal● CMD ::
appium --pre-launch --app-pkg com.project.pakage--app-activity .SplashActivity
--platform-name Android --app /Users/tech/Downloads/app-release17updated.apk
● Terminal::
/Applications/Appium.app/Contents/Resources/node_modules/appium/bin/appi
um.js --address 0.0.0.0 --chromedriver-port 9516 --bootstrap-port 4725
--selendroid-port 8082 --no-reset --local-timezone
Inspector:● Objects can be Inspected by using different tools.
○ UIAutomatorViewer.
○ Appium Inspector.
○ Macaca Inspector(Android & IOS).
○ Accessibility Inspector(IOS).
Inspect By UIAutomatorViewer
● Visualizing developer code
and inspecting each object
to Automate.
● Based on Developer code
and Hierarchy we design
our Automation
Framework.
● We inspect and every
element Developed by UI.
Inspect IOS:● We Inspect Element Based on Ui
Designed.
● We Inspect by using node Details
○ Index
○ Name
○ Resource Id
○ Label
○ ClassName
○ Xpath.
FrameWork Hierarchy :● Framework Hierarchy is design
for both Android and IOS in a
single Project.
● We Planned to Design Hybrid
Framework (POM & Data
Driven)with Maven
Dependencies.
● Easy Maintenance.
● We are Making sure that Code
should be Generic and reuse all
through out Framework.
Android Device Launch Sample Code:● Set All Desired Capabilities Based on Device and Launch
Application.
IOS Device Launch Sample Code:● Set All Desired Capabilities Based on Device and Launch Application.
● All Data will be Maintained in Excel File.
Works till :: XCODE 7 & IOS 9
IOS Device Launch IN XCODE 8 & till IOS 10::
● One on one Physical
Device Connected to
test.
● One on Multiple Devices of parallel Execution
with physical Connection.
Image Validation:● We have a Third party tool to test Icons and Images on Mobile Screens.
○ Sikuli
○ OCR
● This has to be integrated with Appium to access and test.
Cloud Platform:● List Cloud Services available In
Market.
○ SeeTest
○ AWS
○ PCloudy
○ TestObject
○ SauceLabs
○ Intercomm
○ Perfecto
○ Xamarin
○ Eggplant
○ Keynote
○ Soasta
● In Cloud We can test
in particular Devices
or all devices present
in market.
Cloud:
● Our Intention to Cover 100% of Automation.Hope its not possible in Mobile
Application, But still trying to Cover Whole Application Flows
with(Functional,Integration,Sanity,Regression,Exploratory).
Difference:Seetest:● This has record and
Playback service and
generate code.
● Everything can be
managed by seetest tool.
● Parallel execution can be
done.
● Report Generation is
good.
Pcloudy:● In this we have to
integarate our Selenium
code to run on cloud.
● It has live view for 6
devices at once.
● It is time based
execution.
● Report Generation is
cool.
AWS:● In this we can generate
maven integrated zip
execute on cloud.
● Live view is not
possible.
● Report generation is
Good.