Android Test Automation – one year later

2,201 views
1,964 views

Published on

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.

Published in: Technology
0 Comments
4 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
2,201
On SlideShare
0
From Embeds
0
Number of Embeds
310
Actions
Shares
0
Downloads
0
Comments
0
Likes
4
Embeds 0
No embeds

No notes for slide

Android Test Automation – one year later

  1. 1. Android Test Automation – one year later Dominik Dary Productivity & Test Engineering Europe 2014-03-30 Codefest Novosibirsk
  2. 2. WHO AM I? Android Test Automation Dominik Dary Software Engineer Twitter: @dominikdary Github: http://github.com/dominikdary 2
  3. 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
  4. 4. MOBILE TESTING IS DIFFERENT
  5. 5. WHAT IS MOBILE TESTING? Android Test Automation Source: http://www.flickr.com/photos/softwaretestingclub/7159412943/sizes/o/in/photostream/ 5
  6. 6. WHAT IS QUALITY? WHAT IS AGILE TESTING? successful useful usable Performance, etc Correct (functional) Source: Gojko Adzic Android Test Automation 6
  7. 7. ONE PROTOCOL TO RULE THEM ALL
  8. 8. W3C WEBDRIVER SPEC Android Test Automation JSON WIRE PROTOCOLClient Java C# Ruby Python i.e. FirefoxDriver, selendroid, ios-driver Server https://dvcs.w3.org/hg/webdriver/raw-file/tip/webdriver-spec.html Selendroid - Supported Methods 8
  9. 9. ONE PROTOCOL TO RULE THEM ALL Android Test Automation Source: http://en.wikipedia.org/wiki/File:Unico_Anello.png#file 9
  10. 10. SELENIUM FOR ANDROID
  11. 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. 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. 13. TESTING NATIVE APPS •Elements are found by locators •Found element are used for different interactions •Example Android Test Automation 13
  14. 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. 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. 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. 17. KEEP IT STUPID SIMPLE FOR THE TESTERS Android Test Automation
  18. 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. 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
  20. 20. MAINTAINABILITY IS KING Android Test Automation
  21. 21. ANDROID APP TEST CASE Android Test Automation Tests Flow Objects Page Objects 21
  22. 22. TEST INSFRASTRUCTURE
  23. 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. 24. SCALING USING SELENIUM GRID Android Test Automation Client serverGRID HubClient CI server server 24
  25. 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
  26. 26. MULTIPE DEVICES - BORDERLESS TEST AUTOMATION
  27. 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. 28. CROSS PLATFORM MULTI DEVICE DEMO Uses an iOS app, web page and an Android app in one scenario. Android Test Automation 28
  29. 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. 30. WE ARE LOOKING FOR CONTRIBUTORS Android Test Automation 30
  31. 31. Thank You! Questions or Comments? Android Test Automation Dominik Dary Twitter: @dominikdary

×