Download - Mobile WebDriver Selendroid
![Page 1: Mobile WebDriver Selendroid](https://reader034.vdocument.in/reader034/viewer/2022052504/554a12cdb4c9058c5d8b4c18/html5/thumbnails/1.jpg)
Mobile WebDriver Selendroid
Michael Palotas & Dominik Dary Productivity & Test Engineering Europe 2014-01-17 Nokia Here Unconference
![Page 2: Mobile WebDriver Selendroid](https://reader034.vdocument.in/reader034/viewer/2022052504/554a12cdb4c9058c5d8b4c18/html5/thumbnails/2.jpg)
AGENDA
1. Facts about eBay 2. Selenium 3. Mobile Automation Requirements 4. Selendroid 5. Borderless Test Automation
Mobile WebDriver Selendroid 2
![Page 3: Mobile WebDriver Selendroid](https://reader034.vdocument.in/reader034/viewer/2022052504/554a12cdb4c9058c5d8b4c18/html5/thumbnails/3.jpg)
FACTS ABOUT EBAY
![Page 4: Mobile WebDriver Selendroid](https://reader034.vdocument.in/reader034/viewer/2022052504/554a12cdb4c9058c5d8b4c18/html5/thumbnails/4.jpg)
EBAY INC.
MICHAEL PALOTAS - EBAY INTERNATIONAL 4
![Page 5: Mobile WebDriver Selendroid](https://reader034.vdocument.in/reader034/viewer/2022052504/554a12cdb4c9058c5d8b4c18/html5/thumbnails/5.jpg)
EBAY INC. FACTS
• Founded in 1995
• Based in San Jose, California
• ~30000 Employees worldwide
Mobile WebDriver Selendroid 5
![Page 6: Mobile WebDriver Selendroid](https://reader034.vdocument.in/reader034/viewer/2022052504/554a12cdb4c9058c5d8b4c18/html5/thumbnails/6.jpg)
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.
MOBILE FACTS
Mobile WebDriver Selendroid
Source: http://www.ebayinc.com/system/download_links/eBay_MobileMomentum_Facts_052913_0.pdf?download=1
6
![Page 7: Mobile WebDriver Selendroid](https://reader034.vdocument.in/reader034/viewer/2022052504/554a12cdb4c9058c5d8b4c18/html5/thumbnails/7.jpg)
WHO ARE WE?
SELENIUM FOR MOBILE
Michael Palotas Head of Productivity & Test Engineering
Dominik Dary Software Engineer
7
![Page 8: Mobile WebDriver Selendroid](https://reader034.vdocument.in/reader034/viewer/2022052504/554a12cdb4c9058c5d8b4c18/html5/thumbnails/8.jpg)
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 8
![Page 9: Mobile WebDriver Selendroid](https://reader034.vdocument.in/reader034/viewer/2022052504/554a12cdb4c9058c5d8b4c18/html5/thumbnails/9.jpg)
SELENIUM
![Page 10: Mobile WebDriver Selendroid](https://reader034.vdocument.in/reader034/viewer/2022052504/554a12cdb4c9058c5d8b4c18/html5/thumbnails/10.jpg)
WHAT IS SELENIUM?
Selenium automates browsers that’s it
Mobile WebDriver Selendroid 10
![Page 11: Mobile WebDriver Selendroid](https://reader034.vdocument.in/reader034/viewer/2022052504/554a12cdb4c9058c5d8b4c18/html5/thumbnails/11.jpg)
WHAT DO WE DO WITH SELENIUM?
End to End functional test automation
Mobile WebDriver Selendroid
Unit Tests
E2E Test
s
Manual Tests
Integration Tests
Selenium space
11
![Page 12: Mobile WebDriver Selendroid](https://reader034.vdocument.in/reader034/viewer/2022052504/554a12cdb4c9058c5d8b4c18/html5/thumbnails/12.jpg)
SELENIUM
Mobile WebDriver Selendroid
JSON WIRE PROTOCOL
Client
Java
C#
Ruby
Python i.e. Firefox driver
Server
12
![Page 13: Mobile WebDriver Selendroid](https://reader034.vdocument.in/reader034/viewer/2022052504/554a12cdb4c9058c5d8b4c18/html5/thumbnails/13.jpg)
CLIENT
Mobile WebDriver Selendroid
• 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
13
![Page 14: Mobile WebDriver Selendroid](https://reader034.vdocument.in/reader034/viewer/2022052504/554a12cdb4c9058c5d8b4c18/html5/thumbnails/14.jpg)
SERVER
• Receives HTTP requests
• Start and teardown of browser
• Translates requests into browser specific commands
• Communicates back to the client
Mobile WebDriver Selendroid 14
![Page 15: Mobile WebDriver Selendroid](https://reader034.vdocument.in/reader034/viewer/2022052504/554a12cdb4c9058c5d8b4c18/html5/thumbnails/15.jpg)
SCALING USING SELENIUM GRID
Mobile WebDriver Selendroid 15
Client
server GRID Hub Client
CI
server
server
![Page 16: Mobile WebDriver Selendroid](https://reader034.vdocument.in/reader034/viewer/2022052504/554a12cdb4c9058c5d8b4c18/html5/thumbnails/16.jpg)
TECHNICAL HIGH LEVEL OVERVIEW OF THE TEST INFRASTRUCTURE
Our virtualized test infrastructure hosted on VMware vSphere
Selenium Webdriver / Grid
Testing Environment
Test type?
End-to-EndTests
API Call
DB validation
eBay web front end
Clone Source Files
Run test via TestNG
Build via Maven
eBay API
Start the Test Suitevia 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
Mobile WebDriver Selendroid 16
![Page 17: Mobile WebDriver Selendroid](https://reader034.vdocument.in/reader034/viewer/2022052504/554a12cdb4c9058c5d8b4c18/html5/thumbnails/17.jpg)
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
• No jailbreak / rooting of devices
Mobile WebDriver Selendroid 17
![Page 18: Mobile WebDriver Selendroid](https://reader034.vdocument.in/reader034/viewer/2022052504/554a12cdb4c9058c5d8b4c18/html5/thumbnails/18.jpg)
ANOTHER AUTOMATION TOOL?
Android • Calabash-
android • Robotium • Appium • UiAutomator • Espresso
iOS • Calabash-ios • Frank • UIAutomation • Appium • KeepItFunctional
Mobile WebDriver Selendroid 18
Selendroid & ios-driver
![Page 19: Mobile WebDriver Selendroid](https://reader034.vdocument.in/reader034/viewer/2022052504/554a12cdb4c9058c5d8b4c18/html5/thumbnails/19.jpg)
MOBILE WEBDRIVER SELENDROID
![Page 20: Mobile WebDriver Selendroid](https://reader034.vdocument.in/reader034/viewer/2022052504/554a12cdb4c9058c5d8b4c18/html5/thumbnails/20.jpg)
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 20
![Page 21: Mobile WebDriver Selendroid](https://reader034.vdocument.in/reader034/viewer/2022052504/554a12cdb4c9058c5d8b4c18/html5/thumbnails/21.jpg)
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 • Interacts simultaneously with multiple Android devices • Supports hot plugging of hardware devices • Selenium Grid Support for scaling • Advanced Gestures are supported • Built in Inspector to simplify test case development
Mobile WebDriver Selendroid 21
![Page 22: Mobile WebDriver Selendroid](https://reader034.vdocument.in/reader034/viewer/2022052504/554a12cdb4c9058c5d8b4c18/html5/thumbnails/22.jpg)
CLIENT / SERVER ARCHITECTURE
Mobile WebDriver Selendroid 22
CLIENT
SERVER JSON Wire Protocol
BROWSER MOBILE
selendroid ios-driver
![Page 23: Mobile WebDriver Selendroid](https://reader034.vdocument.in/reader034/viewer/2022052504/554a12cdb4c9058c5d8b4c18/html5/thumbnails/23.jpg)
TESTING NATIVE APPS
• Elements are found by locators • Found element are used for different interactions
• Example
Mobile WebDriver Selendroid 23
![Page 24: Mobile WebDriver Selendroid](https://reader034.vdocument.in/reader034/viewer/2022052504/554a12cdb4c9058c5d8b4c18/html5/thumbnails/24.jpg)
NATIVE DEMO
http://youtu.be/074BnGV0mS0
Mobile WebDriver Selendroid 24
![Page 25: Mobile WebDriver Selendroid](https://reader034.vdocument.in/reader034/viewer/2022052504/554a12cdb4c9058c5d8b4c18/html5/thumbnails/25.jpg)
TESTING HYBRID APPS
• Built in support for testing WebViews with WebDriver
• Example:
Mobile WebDriver Selendroid 25
![Page 26: Mobile WebDriver Selendroid](https://reader034.vdocument.in/reader034/viewer/2022052504/554a12cdb4c9058c5d8b4c18/html5/thumbnails/26.jpg)
HYBRID DEMO
http://youtu.be/FGsKI6esKpw
Mobile WebDriver Selendroid 26
![Page 27: Mobile WebDriver Selendroid](https://reader034.vdocument.in/reader034/viewer/2022052504/554a12cdb4c9058c5d8b4c18/html5/thumbnails/27.jpg)
TESTING MOBILE WEB
• Built in support for testing Mobile Web with AndroidDriver-App
• Official replacement of Selenium’s AndroidDriver
• Example:
Mobile WebDriver Selendroid 27
![Page 28: Mobile WebDriver Selendroid](https://reader034.vdocument.in/reader034/viewer/2022052504/554a12cdb4c9058c5d8b4c18/html5/thumbnails/28.jpg)
MOBLE WEB DEMO
http://goo.gl/41uvAx
Mobile WebDriver Selendroid 28
![Page 29: Mobile WebDriver Selendroid](https://reader034.vdocument.in/reader034/viewer/2022052504/554a12cdb4c9058c5d8b4c18/html5/thumbnails/29.jpg)
SELENDROID ARCHITECTURE
Mobile WebDriver Selendroid 29
WebDriver Client
HTTP & WebDriver JSON wire protocol
Selendroid-standalone
Selendroid Standalone
Driver
Android SDK
HTTP
USB
![Page 30: Mobile WebDriver Selendroid](https://reader034.vdocument.in/reader034/viewer/2022052504/554a12cdb4c9058c5d8b4c18/html5/thumbnails/30.jpg)
SELENDROID ARCHITECTURE
Mobile WebDriver Selendroid 30
![Page 31: Mobile WebDriver Selendroid](https://reader034.vdocument.in/reader034/viewer/2022052504/554a12cdb4c9058c5d8b4c18/html5/thumbnails/31.jpg)
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 31
![Page 32: Mobile WebDriver Selendroid](https://reader034.vdocument.in/reader034/viewer/2022052504/554a12cdb4c9058c5d8b4c18/html5/thumbnails/32.jpg)
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 32
![Page 33: Mobile WebDriver Selendroid](https://reader034.vdocument.in/reader034/viewer/2022052504/554a12cdb4c9058c5d8b4c18/html5/thumbnails/33.jpg)
SELENDROID INSPECTOR IN ACTION
Mobile WebDriver Selendroid 33
http://youtu.be/JKZeF3eHljo
![Page 34: Mobile WebDriver Selendroid](https://reader034.vdocument.in/reader034/viewer/2022052504/554a12cdb4c9058c5d8b4c18/html5/thumbnails/34.jpg)
BORDERLESS TEST AUTOMATION
![Page 35: Mobile WebDriver Selendroid](https://reader034.vdocument.in/reader034/viewer/2022052504/554a12cdb4c9058c5d8b4c18/html5/thumbnails/35.jpg)
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 35
![Page 36: Mobile WebDriver Selendroid](https://reader034.vdocument.in/reader034/viewer/2022052504/554a12cdb4c9058c5d8b4c18/html5/thumbnails/36.jpg)
SAME API FOR WEB AND MOBILE
A regular Web Test Case
Mobile WebDriver Selendroid 36
An iPhone app test An Android app test
![Page 37: Mobile WebDriver Selendroid](https://reader034.vdocument.in/reader034/viewer/2022052504/554a12cdb4c9058c5d8b4c18/html5/thumbnails/37.jpg)
CROSS PLATFORM DEMO
Uses an iOS app, web page and an Android app in one scenario.
Mobile WebDriver Selendroid 37
![Page 38: Mobile WebDriver Selendroid](https://reader034.vdocument.in/reader034/viewer/2022052504/554a12cdb4c9058c5d8b4c18/html5/thumbnails/38.jpg)
WE ARE LOOKING FOR
CONTRIBUTORS
Mobile WebDriver Selendroid 38
![Page 39: Mobile WebDriver Selendroid](https://reader034.vdocument.in/reader034/viewer/2022052504/554a12cdb4c9058c5d8b4c18/html5/thumbnails/39.jpg)
Thank You! Questions or Comments?
Mobile WebDriver Selendroid
Dominik Dary Email: [email protected] Twitter: @dominikdary
Fork us at Github: - http://selendroid.io - http://github.com/ios-driver
Michael Palotas Email: [email protected]