Mobile testing has moved forward in leaps and bounds in the past few years. With frameworks like Appium, it has never been easier to scale automated testing and integrate it with continuous integration. While new automation technologies proliferate with device and platform upgrades, Appium provides a singular, consistent automation protocol on top of the best automation technologies,. In the past year, the Appium open source community has added support for new kinds of automation, including XCUITest for iOS, UiAutomator 2 for Android, and even Windows apps. With demos and code samples, Jonathan Lipps explores the capabilities these unlock, and explains Appium's vision for the future—in both mobile testing and the rich variety of UI testing with IoT applications and devices. More and more, the lines are being blurred between desktop, mobile, and IoT applications—and Appium has a plan for taking advantage of this remarkable confluence.
3. The Present and Future of Mobile Automation
Jonathan Lipps • Director of Open Source • Sauce Labs
@AppiumDevs • @saucelabs • @jlipps
Mobile Dev+Test • San Diego, CA
April 28, 2017
Jonathan Lipps • Director of Open Source • Sauce Labs
@AppiumDevs • @saucelabs • @jlipps
Director of Open Source
Project Lead & Architect
4. appium is the open-source, cross-
platform solution for native, web, and
hybrid mobile app automation
appium introduction
5. appium makes continuous integration
possible by providing automation for
mobile apps
appium takes the best mobile
automation technologies and gives them
to you in a WebDriver interface
6. Why WebDriver?
It’s the globally-recognized W3C standard
for browser automation
WebDriver
is an HTTP API
POST /session
POST /session/element
GET /session/element/:id/:attr
7. appium works with any language and
any test runner / test framework, even
custom ones
Java : JS : Python : Ruby : PHP : C# :
ObjC : Perl : Swift : Go
appium enables true cross-platform
test-writing. One API for iOS, Android,
Windows, and macOS
10. Server (appium)Client (test script)
Construct desired capabilities
Request a session with capabilities
Server (appium)Client (test script)
Construct desired capabilities
Request a session with capabilities Parse capabilities
11. Server (appium)Client (test script)
Construct desired capabilities
Request a session with capabilities Parse capabilities
Start session based on caps
Server (appium)Client (test script)
Construct desired capabilities
Request a session with capabilities Parse capabilities
Start session based on capsStore session id for future calls
12. Server (appium)Client (test script)
Construct desired capabilities
Request a session with capabilities Parse capabilities
Start session based on capsStore session id for future calls
Send automation commands
Server (appium)Client (test script)
Construct desired capabilities
Request a session with capabilities Parse capabilities
Start session based on capsStore session id for future calls
Send automation commands Parse command request
13. Server (appium)Client (test script)
Construct desired capabilities
Request a session with capabilities Parse capabilities
Start session based on capsStore session id for future calls
Send automation commands Parse command request
Perform automation
Server (appium)Client (test script)
Construct desired capabilities
Request a session with capabilities Parse capabilities
Start session based on capsStore session id for future calls
Send automation commands Parse command request
Perform automationCheck result, make verifications,
etc…
14. Server (appium)Client (test script)
Construct desired capabilities
Request a session with capabilities Parse capabilities
Start session based on capsStore session id for future calls
Send automation commands Parse command request
Perform automationCheck result, make verifications,
etc…
Server (appium)Client (test script)
Construct desired capabilities
Request a session with capabilities Parse capabilities
Start session based on capsStore session id for future calls
Send automation commands Parse command request
Perform automationCheck result, make verifications,
etc…
Request session quit
15. Server (appium)Client (test script)
Construct desired capabilities
Request a session with capabilities Parse capabilities
Start session based on capsStore session id for future calls
Send automation commands Parse command request
Perform automationCheck result, make verifications,
etc…
Request session quit Shut down app, clean up resources
WebDriver / appium API Example Description
findElement
Find an element by its accessibility id, resource id,
xpath query, etc…
click Click/tap on a found element
getText Get the label/text of a found element
sendKeys
Type into an input field or adjust other UI controls
(like setting slider value)
17. The world of mobile and other new
platform automation is constantly
changing
Earl GreyEspresso
XCUITest
UiAutomator
UiAutomator 2
UIAutomation
With each new technology come new
benefits, but also drawbacks and the pain
of relearning and rewriting everything
18. appium finds the best automation
technologies and translates them to the
same standard WebDriver API
The appium “umbrella”
• Get the benefits of new automation tech without having to
rewrite your tests
• Leverage your industry-standard Selenium/WebDriver
experience
• Write cross-platform tests: one API for multiple platforms
• Encourage platform vendors to support one stable and
standard protocol
19. appium platforms
Deprecated Platform Description
iOS - Instruments & UiAutomation
- Powered by Instruments & UiAutomation
- Available up till iOS 9.3
Android - UiAutomator
- Powered by UiAutomator
- Supported from Android 4.2
- Superseded by UiAutomator 2
20. Current Platform Description
iOS
- Powered by XCUITest (Apple) & WDA (Facebook)
- Available for iOS 9.3+
Android
- Powered by UiAutomator 2 (Google)
- Released before Android 6.0
Windows Desktop
- Powered by WinAppDriver (Microsoft)
- Released before Android 6.0
macOS Desktop
- Powered by Appium for Mac (community)
- Works with most versions of OS X
youi.tv
- Powered by youi-engine (Youi)
- Works with the Youi app framework
appium platform demos
22. appium desktop is a point and click
interface for using appium and
inspecting your app’s structure
appium desktop makes it easy to get
started writing tests for your app by
showing you what elements you can use
24. In a world of many automation platforms,
appium becomes more than a software
package bundling them all together
The driver portfolio grows
• WinAppDriver expands to support mobile, Xbox, more?
• Espresso support?
• Earl Grey support?
• Unity3d support?
• IoT platform support?
25. IoT??!??
• Automate IoT UIs (Android-based)
• Automate IoT framework software
• Lots of other possibilities…
26. appium 2.0 is…
• The WebDriver protocol (plus necessary extensions)
• A set of NodeJS libraries for writing drivers easily
• A loose federation of drivers maintained by communities
• A CLI tool for installing, managing, and running drivers
• Extending this tool to appium desktop
appium is the open-source, cross-
platform solution for native, web, and
hybrid mobile app automation