Android & IOS Automation

23
Mobile Automation Android & IOS Harikrishna Recharla

Transcript of Android & IOS Automation

Page 1: Android & IOS Automation

Mobile Automation

Android & IOS

Harikrishna Recharla

Page 2: Android & IOS Automation

Overview

Requirement

Setup

Inspecting Developer Code

Running Sample Script

Framework Hierarchy

Cloud Paltform

Page 3: Android & IOS Automation

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.

Page 4: Android & IOS Automation

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.

Page 5: Android & IOS Automation

Appium Setup:

● Default Viewer of

Appium.

● Both Android and IOS

can be configured at

same time.

● It can be Manually

started and Stopped.

Page 6: Android & IOS Automation

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.

Page 7: Android & IOS Automation

Android Settings:

● Select Platform Name

and Automation Name.

● App path is not

Mandatory, We specify

in code level to access

device apk.

Page 8: Android & IOS Automation

IOS Settings:

● App Path: Set Archived

Xcode Path.

● Set Platform Version.

Page 9: Android & IOS Automation

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

Page 10: Android & IOS Automation

Inspector:● Objects can be Inspected by using different tools.

○ UIAutomatorViewer.

○ Appium Inspector.

○ Macaca Inspector(Android & IOS).

○ Accessibility Inspector(IOS).

Page 11: Android & IOS Automation

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.

Page 12: Android & IOS Automation

Inspect IOS:● We Inspect Element Based on Ui

Designed.

● We Inspect by using node Details

○ Index

○ Name

○ Resource Id

○ Label

○ ClassName

○ Xpath.

Page 13: Android & IOS Automation

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.

Page 14: Android & IOS Automation

Android Device Launch Sample Code:● Set All Desired Capabilities Based on Device and Launch

Application.

Page 15: Android & IOS Automation

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

Page 16: Android & IOS Automation

IOS Device Launch IN XCODE 8 & till IOS 10::

Page 17: Android & IOS Automation

● One on one Physical

Device Connected to

test.

Page 18: Android & IOS Automation

● One on Multiple Devices of parallel Execution

with physical Connection.

Page 19: Android & IOS Automation

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.

Page 20: Android & IOS Automation

Cloud Platform:● List Cloud Services available In

Market.

○ SeeTest

○ AWS

○ PCloudy

○ TestObject

○ SauceLabs

○ Intercomm

○ Perfecto

○ Xamarin

○ Eggplant

○ Keynote

○ Soasta

Page 21: Android & IOS Automation

● In Cloud We can test

in particular Devices

or all devices present

in market.

Page 22: Android & IOS Automation

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).

Page 23: Android & IOS Automation

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.