19
LIVE WEBINAR: MOBILE TESTING WITH APPIUM – HOW TO MODIFY YOUR TESTS TO RUN ON iOS10? 1

LIVE WEBINAR: MOBILE TESTING WITH APPIUM … ios10...Agenda Appium architecture for iOS version

  • Upload
    others

  • View
    13

  • Download
    0

Embed Size (px)

Citation preview

Page 1: LIVE WEBINAR: MOBILE TESTING WITH APPIUM … ios10...Agenda Appium architecture for iOS version

LIVE WEBINAR:

MOBILE TESTING WITH APPIUM –

HOW TO MODIFY YOUR TESTS TO RUN ON iOS10?

1

Page 2: LIVE WEBINAR: MOBILE TESTING WITH APPIUM … ios10...Agenda Appium architecture for iOS version

Speakers

Guy Arieli

CTO, Experitest

Tal Brameir

CEO, Experitest

2

Page 3: LIVE WEBINAR: MOBILE TESTING WITH APPIUM … ios10...Agenda Appium architecture for iOS version

Agenda

Appium architecture for iOS version <=9

UIAutomation vs XCUITest

Appium 1.6 functionality drop

Element identification overview

Page Source Difference

Overcome page source – find.js

Overcome page source – driver extension

XPath Performance Considerations

Enterprise Appium

Q&A

5 min

5 min

5 min

10 min

5 min

5 min

5 min

5 min

5min

10 min

3

Page 4: LIVE WEBINAR: MOBILE TESTING WITH APPIUM … ios10...Agenda Appium architecture for iOS version

Appium architecture for iOS version <=9

Test code / logic

HTTP / Json

Any language (Java, C#,

Python...)

WebDriver controller execute

the HTTP requests

Instruments command client

(part of xCode)

node.js

Instruments (endless test)

execute bootstrap.js

UIAutomation

Javascript

WebDriver Script Appium server Device infra

4

Page 5: LIVE WEBINAR: MOBILE TESTING WITH APPIUM … ios10...Agenda Appium architecture for iOS version

Appium architecture for iOS version <=9

Test code / logic

HTTP / Json

Any language (Java, C#,

Python...)

WebDriver controller execute

the HTTP requests

xcodebuild -test

node.js

XCUITest (endless test) execute

using WebDriverAgent app

XCUITest – Debug Server launch

WebDriverAgentRunner communicate

with Test Manager Process

Objective C

WebDriver Script Appium server Device infra

5

Page 6: LIVE WEBINAR: MOBILE TESTING WITH APPIUM … ios10...Agenda Appium architecture for iOS version

UIAutomation (iOS 9 and below) vs XCUITest (iOS 10)

XCUITest (ObjectiveC)

XCUIApplication *app = [[XCUIApplication alloc]

init];

[app.buttons[@"Start"] tap];

XCUITest Advanatages

Better code generation

(when used as a tool)Faster

Can be coded in Objective C or Swift -

add many programming language

capabilities that were not available in

UIAutomation Javascript

Better handling wait for

object

UIAutomation (Javascript)

var target = UIATarget.localTarget();

target.frontMostApp().mainWindows().buttons()["OK"].tap();

6

Page 7: LIVE WEBINAR: MOBILE TESTING WITH APPIUM … ios10...Agenda Appium architecture for iOS version

Appium 1.6 functionality drop

Work in landscape (fixed in 1.6.2)

Geolocation support

Device shake

Device locking

Pinch

autoAcceptAlerts

findElementByIosUIAutomation

execute_script

7

Page 8: LIVE WEBINAR: MOBILE TESTING WITH APPIUM … ios10...Agenda Appium architecture for iOS version

Element identification overviewDescriptionType

The label attribute of the element.Label

The raw value attribute of the elementValue

Direct Path to the elementPath (Appium)

Element X location (in pixels)X

Element Y Location (in pixels)Y

Width of element (in pixels)Width

Height of element (in pixels)Height

Is the element visible on the screenVisible (Appium

The value that is displayed when the element has no value.Hint

Is the element enabled \ disabled modeEnabled

https://developer.apple.com/reference/xctest/xcuielementattributes?language=objc

8

Page 9: LIVE WEBINAR: MOBILE TESTING WITH APPIUM … ios10...Agenda Appium architecture for iOS version

Page Source Difference

9

Page 10: LIVE WEBINAR: MOBILE TESTING WITH APPIUM … ios10...Agenda Appium architecture for iOS version

Element identification overview

DetailsiOS 10iOS 9

Class name (xpath node name)XCUIElementTypeApplicationUIAApplication

Class name (xpath node name)XCUIElementTypeWindowUIAWindow

Add new tag for the viewXCUIElementTypeOther

Class name (xpath node name)XCUIElementTypeScrollViewUIAScrollView

Class name (xpath node name)XCUIElementTypeStaticTextUIAStaticText

Class name (xpath node name)XCUIElementTypeImageUIAImage

Class name (xpath node name)XCUIElementTypeTextFieldUIATextField

Class name (xpath node name)XCUIElementTypeButtonUIAButton

10

Page 11: LIVE WEBINAR: MOBILE TESTING WITH APPIUM … ios10...Agenda Appium architecture for iOS version

Overcome page source – find.js

11

Page 12: LIVE WEBINAR: MOBILE TESTING WITH APPIUM … ios10...Agenda Appium architecture for iOS version

Overcome page source – driver extension

12

Demo

Page 13: LIVE WEBINAR: MOBILE TESTING WITH APPIUM … ios10...Agenda Appium architecture for iOS version

XPath Performance Considerations

driver.findElements(By.xpath("//*"))[0] - >60 Seconds

driver.findElement(By.xpath("//*[0]")) - ~40 Seconds

driver.findElement(By.xpath("//*[@value='OK']")) - ~10 Seconds

driver.findElement(By.xpath("//XCUIElementTypeButton"))) - ~10 Seconds

driver.findElement(By.xpath("//XCUIElementTypeButton[@value=OK']")) –

3 Seconds

13

Page 14: LIVE WEBINAR: MOBILE TESTING WITH APPIUM … ios10...Agenda Appium architecture for iOS version

Enterprise Appium by Experitest

A commercial, enhanced version of the Appium open-source suitable

for large-scale Enterprise deployments

Scales local automation

to an Enterprise-

Wide environment

Adds Remotingcapabilities critical for

offshore teams

Enables Quick & Easy

Set-up and Scripting

Increases

Functionality and

Performance

Offers full,

customizable

Reporting

Provides Device

Application and

User

Management

Immediate

Support for

New Operating

Systems

Enterprise level

support

14

P

Page 15: LIVE WEBINAR: MOBILE TESTING WITH APPIUM … ios10...Agenda Appium architecture for iOS version

Demo

15

Page 16: LIVE WEBINAR: MOBILE TESTING WITH APPIUM … ios10...Agenda Appium architecture for iOS version

Demo

16

Page 17: LIVE WEBINAR: MOBILE TESTING WITH APPIUM … ios10...Agenda Appium architecture for iOS version

Demo

17

Page 18: LIVE WEBINAR: MOBILE TESTING WITH APPIUM … ios10...Agenda Appium architecture for iOS version

Q&A

18

Page 19: LIVE WEBINAR: MOBILE TESTING WITH APPIUM … ios10...Agenda Appium architecture for iOS version

Thank you

19