Upload
bartlomiej-pisulak
View
199
Download
1
Tags:
Embed Size (px)
Citation preview
Challenges of automated mobile UI testing
Bartłomiej PisulakSoftware Engineer – Pegasystems
Trainer – Compendium CE
10
Appium
Appium is the cross-platform
solution for native and hybrid
mobile automation
“One framework to rule them all”
11
Appium Architecture
HTTP server that creates and
handles WebDriver sessions
Starts a “test case” on the
device that spawns a server
and listens for proxies
commands
12
Appium Philosophy
Test the same
app you submit
to the
marketplace
Write your tests
in any language,
using any
framework
Use a standard
automation
specification and
API
Build a large and
thriving open-
source
community effort
14
Connection initialization
desired_caps = {}desired_caps['appium-version'] = '1.0’desired_caps['platformName'] = 'iOS’desired_caps['platformVersion'] = '8.1’desired_caps['deviceName'] = 'iPhone 5s’desired_caps['app'] = os.path.abspath(‘OSS2015.app')
self.driver = webdriver.Remote('http://0.0.0.0:4723/wd/hub', desired_caps)
15
Connection initialization
desired_caps = {}desired_caps['appium-version'] = '1.0’desired_caps['platformName'] = 'Android’desired_caps['platformVersion'] = '4.4’desired_caps['deviceName'] = 'Nexus’desired_caps['app'] = os.path.abspath(‘app-debug.apk')
self.driver = webdriver.Remote('http://0.0.0.0:4723/wd/hub', desired_caps)
16
Code examples
btn = self.driver.find_element_by_xpath("//UIAApplication[1]/UIAWindow[1]/UIA
Button[1]")
btn = self.driver.find_element_by_name("SAY HELLO")
Getting elements
Interaction
btn.click()
Combining with unit tests
self.assertEqual(btn.text, "SAY HELLO")
18
Demo: Real-life CaseHow to add automated UI tests to cross-platform development IDE
Python + Appium + Imagemagick +
Jenkins
19
To sum up…
Ask yourself: do I need UI testing?
Realize your goals
Design carefully
Maintenance!!!
Automate
Don’t reinvent the wheel – spend your time
on doing creative things :)