This talk would showcase the road of eBay in the field of mobile test automation and our applied learnings from the past. It would also include showing Selendroid as a tool in action. As well the presentation would showcase the interaction between test engineers and developers and show the use of other tools in the field of mobile automation.
1. Android Test Automation –
one year later
Dominik Dary
Productivity & Test Engineering Europe
2014-03-30 Codefest Novosibirsk
2. WHO AM I?
Android Test Automation
Dominik Dary
Software Engineer
Twitter: @dominikdary
Github: http://github.com/dominikdary
2
3. AGENDA
1. Mobile Testing is different
2. One Protocol to Rule them all
3. Selenium for Android: Selendroid
4. Keep It Stupid Simple for the Testers
5. Maintainability is King
6. Test Insfrastructure
7. Multiple Devices - Borderless Test Automation
8. Conclusion
Android Test Automation 3
5. WHAT IS MOBILE TESTING?
Android Test Automation
Source: http://www.flickr.com/photos/softwaretestingclub/7159412943/sizes/o/in/photostream/
5
6. WHAT IS QUALITY? WHAT IS AGILE TESTING?
successful
useful
usable
Performance, etc
Correct (functional)
Source:
Gojko Adzic
Android Test Automation 6
11. SELENDROID
Open sourced on github:
– https://github.com/selendroid
Documentation:
•https://selendroid.io
Committers:
– eBay, Salesforce and Facebook
Getting help
– IRC : #selendroid on freenode
Android Test Automation 11
12. SELENDROID FEATURES
– The only mobile WebDriver that supports native & hybrid apps
and testing the mobile web on Android versions (API 10 to 19)
– Full compatibility with the JSON Wire Protocol.
– The app under test must not be modified
– No jailbreak / rooting of devices
– Interacts simultaneously with multiple Android devices
– Supports hot plugging of hardware devices
– Advanced Gestures are supported
Android Test Automation 12
13. TESTING NATIVE APPS
•Elements are found by locators
•Found element are used for different interactions
•Example
Android Test Automation 13
14. TESTING HYBRID APPS
•Built in support for testing WebViews
with WebDriver
•Switching between the element-tree of
native-ui and web-ui
Example:
Android Test Automation 14
15. TESTING MOBILE WEB
•Built in support for testing Mobile Web
with AndroidDriver-App
•Official replacement of Selenium’s AndroidDriver
•Example:
Android Test Automation 15
16. Selendroid in Action
– Native Demo: http://youtu.be/074BnGV0mS0
– Hybrid Demo: http://youtu.be/FGsKI6esKpw
– Mobile Web Demo: http://goo.gl/41uvAx
– Selendroid Quick Start:
http://selendroid.io/quickStart.html
Android Test Automation 16
17. KEEP IT STUPID SIMPLE
FOR THE TESTERS
Android Test Automation
18. SELENDROID INSPECTOR
•View hierarchy
•View UI element properties
•UI screenshot with view
locator
•Record the click actions
•View HTML of a web view
•XPath helper
Android Test Automation
Demo: http://youtu.be/JKZeF3eHljo
18
19. SELENDROID REPL
•Interactive Command execution
•Results are immediately displayed
•The app can be manually used to navigate to the dialog
you want to automate.
•Interested? Read more: http://goo.gl/U8D4yu
Android Test Automation 19
23. THE IMPORTANCE OF PARALLEL TEST
EXECUTION
•Multiple Apps
•12 European Sites
•iOS Devices
–iPhone vs. iPad
–Version
•Android Devices
–Manufactures
–Screen Sizes
–OS Modifications
Android Test Automation 23
Picture Source: http://www.flickr.com/photos/ippei-janine/483345027/
24. SCALING USING SELENIUM GRID
Android Test Automation
Client
serverGRID HubClient
CI
server
server
24
25. TEST INFRASTRUCTURE
Android Test Automation 25
Our virtualized test infrastructure hosted on VMware vSphere
Selenium Webdriver / Grid
Testing Environment
Test type?
End-to-End
Tests
API Call
DB validation
eBay web
front end
Clone
Source Files
Run test
via TestNG
Build via
Maven
eBay API
Start the Test Suite
via Brower
View the Test
Session and the
Result in the
Browser
Version Control System
Continuous Integration
System (Jenkins)
Agile
Team
Automated Test
Development
via IDE
QE
Engineer
Database
Tests can be
started on Grid
+
Grid Hub
27. SAME API FOR WEB AND MOBILE
A regular Web Test Case
Android Test Automation
An iPhone app test An Android app test
27
28. CROSS PLATFORM MULTI DEVICE DEMO
Uses an iOS app, web page and an Android app in one scenario.
Android Test Automation 28
29. CONCLUSION
•Use the same approach and infrastructure as web
•Our business is borderless test automation needs
to be as well
•Open Source is your best friend
•Work with the right people
Android Test Automation 29
30. WE ARE LOOKING FOR
CONTRIBUTORS
Android Test Automation 30
31. Thank You!
Questions or Comments?
Android Test Automation
Dominik Dary
Twitter: @dominikdary