This document summarizes a presentation on cross-platform mobile UI automation testing. The key points covered are:
- The need for UI automation in testing for consistency, integrity, robustness, and usability from a real user perspective.
- An overview of Appium as a tool that supports automation on multiple platforms and frameworks with a common interface. It works by translating commands to individual platform frameworks via Selenium WebDriver.
- A python library called Appium-UIAutomation that makes it easy to find and interact with mobile app elements across iOS and Android using common methods that guess the element type based on hints.
- A demonstration of how to get started using this open source library.
3. We will cover…
Need of UI automation in testing
Understanding Appium and automation frameworks
Explore Appium-UIAutomation python lib
Hands on
Road map
1
4. Software testing is to qualify,
Objectives of software testing
2
• Consistency and integrity
• Robustness and stability
• Ease of use from real user perspective
5. Manual testing Pros/Cons
3
- Ability to see real user
issues
- Lot more flexibility
- Can make system more
robust by creative
destructive thinking
- Slow and costly
- Don’t scale well
- Not consistent or
repeatable
- Lack of training
- Difficult to manage
- Tedious for regression
of large projects
Pros
Cons
6. Automated testing driven by a manual tester
What makes sense?
4
• Repetitive and tedious for manual tester
Consistency and integrity
• Need fresh mind and time to find creative ideas to break system
Robustness and stability
• Need involvement and analysis from real user’s perspective
Ease of use from real user perspective
8. 6
• Supports many frameworks
and platforms
• Open source
• Active community
• Accepts common commands
and translates them for
individual platform
One stop solution
10. Appium Components
8
Client
API calls can be
made from many
languages
Selenium Web driver
Is an API which
directly
communicates
with platform’s
native automation
frameworks
Mobile automation
frameworks
They understand
commands sent by
selenium web
driver and return
results back
11. Most recent automation frameworks
9
• XCUITest for iOS and UIAutomator V2 for android
• XCUITest supports iOS 10 / XCode 8
• UIAutomator V2 supports most recent android versions
• Both supported by Appium 1.6
13. Appium-UIAutomation lib
11
• Client lib made in python
• Common “Find something” for both iOS / Android
• Uses Appium-Python-Client and Selenium 3.0
• Best guess the widget and find it through XPath
• Easy as you find what you see
14. How it guesses?
12
<XCUIElementTypeTextField Text field <android.widget.EditText…
Type of component
Hint | Value | Label |
Name Text field Text
By name
3rd element in result Text field 3rd element in result
At index
15. What else?
13
• Uses python unittest framework for test suite
• Processes common find commands
• Processes common perform commands on Appium
• Helper script to generate initial test case
• Asks for platform and app bundle path to execute
17. Start using it :)
15
• Open source at https://github.com/ayshrimali/Appium-
UIAutomation
• Contributors are welcome
• Post issues, suggest improvements
18. 16
“Automation does not do what testers used to do, unless one
ignores most things a tester really does. Automated testing is
useful for extending the reach of the testers work, not to
replace it.”
–James Bach
(Ex - Testing manager @Apple)