Seite 1
Agenda
Agenda
- Our starting point
- appium architecture
- How we used appium
Seite 2
Android
Hybrid
GWT
starting point
Seite 3
10 months
20 – 30 apps
600 Features
7 scrum teams
60+ developers
some figures
Seite 4
The Building Blocks we have to deal with
App
core
library
Seite 5
The Development Workflow per App
App
apk
war
Seite 6
The Communication big picture
App 1
core
library
App 2
core
library
App 3
core
library
Post IT
Infrastructure
Authorization
Communication
Caching
Widgets
Businesslogic
User Interface
Seite 7
The Development Workflow the big picture
core
library
Team Post
App
2
App
1
App
3
App
4
Team 1
Team 2
Team 3
Team 4
2 Weeks 2 Weeks
Seite 8
Quality
available mobile test tools
appium
selendroid
ios-driver
calabash
Seite 9
appium Architecture
appium Architecture
Appium is an HTTP server that creates
and handles webdriver sessions.
Appium Server is written in node.js
Seite 10
webdriver
webdriver
a platform and language-neutral
interface and associated wire protocol
that allows programs or scripts to
introspect into, and control the
behaviour of, a web browser.
https://w3c.github.io/webdriver/webdriver-spec.html
Seite 11
webdriver
webdriver mobile extension
the appium people extended the json
wire protocol for the mobile world (Eg.
WEBVIEW, Connection Type)
https://code.google.com/p/selenium/source/browse/spec-
draft.md?repo=mobile
Seite 12
appium Architecture
appium Architecture
appium starts a test case on the device
that spawns a server and listens for
proxied commands
Seite 13
appium Architecture
appium Architecture
on android, appium proxies commands
to a UIAutomator test case running on
the device. For older versions it uses
selendroid.
Seite 14
appium Architecture
appium Architecture
as clients you can use the standard
selenium drivers or the specific client
libraries with the mobile json wire
protocol extension.
https://github.com/appium/java-client
Seite 15
appium Architecture
appium Architecture
Web
driver
Appium
Selendroid
IOSDriver
Mobile
AppJSON Wire
Protocol
UIAutomator
Instrumentation
UIAutomation
mobile
JSON Wire
Protocol
Seite 16
supported platforms
appium Architecture
Platform Automation
iOS ios-driver
(UIAutomation)
Android 4.2+ appium-uiautomator
(UiAutomator)
Android 2.3+ selendroid
(Instrumentation)
Seite 17
selendroid
selendroid Architecture
Selendroid is a test automation
framework which drives off the UI of
Android native and hybrid applications
and the mobile web. Tests are written
using the Selenium 2 client API
Seite 18
selendroid
selendroid Architecture
Selendroid is based on the Android
instrumentation framework.
Android instrumentation is a set of control
methods or "hooks" in the Android system.
These hooks control an Android component
independently of its normal lifecycle. They
also control how Android loads applications.
Seite 19
selendroid
selendroid Architecture
Seite 20
appium Android
appium UIAutomator architecture
Seite 21
The Development Workflow per App
SeleniumUiTestHelper
Test Code
AppiumUiTestHelper
Selenium WebDriver
Selenium Appium
Chromedriver Selendroid
Chrome Intermec CN51
Seite 22
Demo
Demo
Appium Setup the history
JSON Wire
ProtocolMaven
JUnit
appium v0.17
Appium Setup the history
JSON Wire
Protocol
appium v1.0.0
Maven
JUnit selendroid
Appium Setup the history
JSON Wire
Protocol
appium v1.1.0
Maven
JUnit
Seite 26
Appium Setup
apkapk’s
Seite 27
Appium Tests
apk’s
ADB
Seite 28
Demo
Code Walkthrough
Demo
Seite 29
scaling
scaling possibilities
selenium grid
docker
test load balancer
Seite 30
Appium / Selenium Test
796 Integration
Tests
Appium &
Selenium
Seite 31
Quality
appium and BDD
appium can be combined with eg.
cucumber
Seite 32
Quality
why not the cloud or
emulator
https://saucelabs.com/appium
http://xamarin.com/test-cloud
Seite 33
Appium Tests
The pain
 Only one appium server instance per
team
 All devices connected over one usb
 Session handling
 Network infrastracture
 Backend
Seite 34
Appium Tests
The pain
 Tests need to be very robust
 Webview switching
 Had to tweak the apk for appium tests.
Only one process.
 Setup is complicated and time
consuming (also local)
Seite 35
Appium Tests
The pain
 Sometimes devices just fail, because of
other reasons than your code
 Hard to reproduce failures (eg. waiting
for element fails), we built in a retry
 Appium tests are slow
Seite 36
Appium Tests
Whats next
 Uncoupling host:port
eg. with consul
 Move to appium client driver,
UIAutomator
 One Device per Acceptance Test ;)
Seite 37
Questions & Answer

Appium & Jenkins