Cross Platform Mobile UI Automation Testing
Presenter: Anjum Shrimali
We will cover…
Need of UI automation in testing
Understanding Appium and automation frameworks
Explore Appium-UIAutomation python lib
Hands on
Road map
1
Software testing is to qualify,
Objectives of software testing
2
• Consistency and integrity
• Robustness and stability
• Ease of use from real user perspective
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
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
Mobile UIAutomation frameworks
5
iOS
• UIAutomator
• XCUITest
Android
• Instrumentation
• Robotium/Calabash
• Expresso/V2
• Selendroid
• UIAutomator/V2
6
• Supports many frameworks
and platforms
• Open source
• Active community
• Accepts common commands
and translates them for
individual platform
One stop solution
Involves client, Selenium web driver, mobile platforms
How Appium works?
7
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
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
Basics of UIAutomation
10
Find something
Do something
Check something
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
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
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
14
Start using it :)
15
• Open source at https://github.com/ayshrimali/Appium-
UIAutomation
• Contributors are welcome
• Post issues, suggest improvements
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)
17
Thank you

Cross platform mobile UI automation testing

  • 1.
    Cross Platform MobileUI Automation Testing Presenter: Anjum Shrimali
  • 3.
    We will cover… Needof UI automation in testing Understanding Appium and automation frameworks Explore Appium-UIAutomation python lib Hands on Road map 1
  • 4.
    Software testing isto 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 drivenby 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
  • 7.
    Mobile UIAutomation frameworks 5 iOS •UIAutomator • XCUITest Android • Instrumentation • Robotium/Calabash • Expresso/V2 • Selendroid • UIAutomator/V2
  • 8.
    6 • Supports manyframeworks and platforms • Open source • Active community • Accepts common commands and translates them for individual platform One stop solution
  • 9.
    Involves client, Seleniumweb driver, mobile platforms How Appium works? 7
  • 10.
    Appium Components 8 Client API callscan 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 automationframeworks 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
  • 12.
    Basics of UIAutomation 10 Findsomething Do something Check something
  • 13.
    Appium-UIAutomation lib 11 • Clientlib 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 <XCUIElementTypeTextFieldText 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 • Usespython 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
  • 16.
  • 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 notdo 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)
  • 19.