Selendroid is a test automation framework which drives of the UI of Android native and hybrid applications (apps). Tests are written using the Selenium 2 client API.
Selendroid can be used on emulators and real devices and can be integrated as a node into the Selenium Grid for scaling and parallel testing.
Features of selendroid
- The app under test must not be modified in order to automate it
- Between the native and the web context can be switched back and forth, which basically means the concept of automating native or hybrid apps are the same.
- Different locator types are supported to find elements
- Gestures are supported: Advanced User Interactions API
- Selendroid can interact with multiple Android devices (emulators or hardware devices) at the same time
- Existing Emulators are started automatically
- Selendroid supports hot plugging of hardware devices
- It can be integrated as a node into the Selenium Grid for scaling and parallel testing
- Multiple Android target API support (10 to 19)
- Build in Inspector to simplify test case development.
Documentation is available at http://selendroid.io
4. EBAY INC. FACTS
•Founded in 1995
•Based in San Jose, California
•27770 Employees worldwide
Mobile WebDriver Selendroid
4
5. MOBILE FACTS
Mobile Facts
Mobile Fun Facts
162,000,000 downloads
of eBay Inc’s apps
Every 15 seconds, a pair of ladies shoes is purchased on
eBay Mobile in the UK.
Mobile transaction volume
2012: 13 billion USD – overall increase of 120 % from 2011!
2013: expectation is to transact 20 billion USD
4.2 million items
are listed with using mobile apps every week
500 USD
mobile transaction volume every second
Every week, more than 11,000 cars and 690,000 car parts
are sold through eBay’s mobile apps.
Source: http://www.ebayinc.com/system/download_links/eBay_MobileMomentum_Facts_052913_0.pdf?download=1
Mobile WebDriver Selendroid
5
6. WHO AM I?
Dominik Dary
Software Engineer
E-mail: ddary@ebay.com
Twitter: @dominikdary
Github: http://github.com/dominikdary
Mobile WebDriver Selendroid
6
7. DISCLAIMER
–Test Automation is Software Development
–End-to-End Tests are slow
–Perfect vs. Good Enough – A Context where
Time to Market Matters
Mobile WebDriver Selendroid
7
10. WHAT DO WE DO WITH SELENIUM?
End to End functional test automation
Manual
Tests
Selenium space
E2
E
Test
s
Integration Tests
Unit Tests
Mobile WebDriver Selendroid
10
12. CLIENT
•Is seen as „Selenium“ by the users
•Is called by the test framework or the CI server
•Generates HTTP requests which are received by the
server
•Supported languages:
Java, C#, Python, Ruby, PHP, JS
Mobile WebDriver Selendroid
12
13. SERVER
•Receives HTTP requests
•Start and teardown of browser
•Translates requests into browser specific commands
•Communicates back to the client
Mobile WebDriver Selendroid
13
14. SCALING USING SELENIUM GRID
Client
Client
CI
server
GRID Hub
server
server
Mobile WebDriver Selendroid
14
15. TECHNICAL HIGH LEVEL OVERVIEW OF
THE TEST INFRASTRUCTURE
Selenium Webdriver / Grid
Automated Test
Development
via IDE
QE
Engineer
Tests can be
started on Grid
eBay web
front end
Version Control System
Clone
Source Files
End-to-End
Tests
Start the Test Suite
via Brower
View the Test
Session and the
Result in the
Browser
+
Build via
Maven
Test type?
Agile
Team
Grid Hub
API Call
eBay API
Run test
via TestNG
Continuous Integration
System (Jenkins)
DB validation
Our virtualized test infrastructure hosted on VMware vSphere
Database
Testing Environment
Mobile WebDriver Selendroid
15
16. MOBILE AUTOMATION REQUIREMENTS
•Use the same approach and infrastructure as web
•Use the Load Balancer / Resource Management
Features of Selenium Grid
•Manage multiple applications / versions / languages
•No modification of mobile app
•Mobile App Runtime Inspection Support
Mobile WebDriver Selendroid
16
19. SELENDROID
Open sourced on github:
– https://github.com/selendroid
Documentation:
• https://selendroid.io
Committers:
– eBay, Salesforce and Facebook
Getting help
– IRC : #selendroid on freenode
Mobile WebDriver Selendroid
19
20. SELENDROID FEATURES
•The only mobile WebDriver that supports native &
hybrid apps on Android versions (API 10 to 19)
•The app under test must not be modified
•Interacts simultaneously with multiple Android devices
•Supports hot plugging of hardware devices
•Selenium Grid Support for scaling
•Advanced Gestures are supported
•Build in Inspector to simplify test case development
•Full compatibility to the JSON Wire Protocol.
Mobile WebDriver Selendroid
20
21. CLIENT / SERVER ARCHITECTURE
MOBILE
BROWSER
CLIENT
JSON Wire Protocol
SERVER
selendroid
ios-driver
Mobile WebDriver Selendroid
21
22. TESTING NATIVE APPS
• Elements are found by locators
• Found element are used for different
interactions
• Example
Mobile WebDriver Selendroid
22
28. TEST: DEVICE VS. EMULATOR
•Hardware devices and Emulators can be used
•Hardware devices are much faster
•Android devices will be identified automatically
•Hot plugging of hardware devices is supported
Mobile WebDriver Selendroid
28
29. SELENDROID INSPECTOR
•View hierarchy
•View UI element properties
•UI screenshot with view locator
•Record the click actions
•Display the html of a web view
•XPath helper
Mobile WebDriver Selendroid
29
32. BORDERLESS TEST AUTOMATION
•Our business is borderless test automation needs
to be as well
•Use the same approach and infrastructure for web
and mobile
Mobile WebDriver Selendroid
32
33. SAME API FOR WEB AND MOBILE
A regular Web Test Case
An iPhone app test
An Android app test
Mobile WebDriver Selendroid
33
34. CROSS PLATFORM DEMO
Uses in one test scenario an iOS app, web page and an Android app.
Mobile WebDriver Selendroid
34