Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Advanced Mobile Testing on Sauce Labs

A3a537f7d83e313fdc78521128d309a4?s=47 Sauce Labs
September 19, 2013

Advanced Mobile Testing on Sauce Labs

A3a537f7d83e313fdc78521128d309a4?s=128

Sauce Labs

September 19, 2013
Tweet

More Decks by Sauce Labs

Other Decks in Technology

Transcript

  1. Jonathan Lipps Sr Developer | @jlipps | @saucelabs Advanced Mobile

    Testing on Sauce (9/19/2013) Promo code: mobilewebinar2 1,000 free testing minutes
  2. Agenda 1. 2. 3. 4. 5. 6. Recap Intro to

    Android Webviews and Hybrid Apps Gestures & Special UI Elements The Future of the Appium API Q & A
  3. Sauce Labs is a testing platform used by thousands to

    securely test mobile and web apps.
  4. http://saucelabs.com/mobile

  5. Appium is the open-source, cross- platform solution for native and

    hybrid mobile automation
  6. http://appium.io

  7. Open-source Simulators Real devices Native apps Hybrid apps Mobile Web

    Robot-controlled Sauce Simulators Real devices Native apps Hybrid apps Mobile Web Robot-controlled
  8. Appium has the same client / server architecture and uses

    the same protocol as Selenium
  9. Android support works the same way as iOS, but with

    a different set of desired capabilities.
  10. None
  11. None
  12. Review: Sending apps to Sauce Host the app on the

    web Use the Sauce Storage API https://saucelabs.com/docs/rest#storage 1. 2.
  13. None
  14. https://saucelabs.com/jobs/3c55bc37fc334dc2946c9720caf0c909

  15. Android Locator Strategies

  16. Older Android Versions If you specify an Android version <

    4.2, Appium on Sauce will give you a Selendroid* session. Selendroid is a project bundled with Appium enabling older device and webview automation. *Selendroid’s API is slightly different from Appium’s! http://selendroid.io/ for details
  17. Automating Webviews on iOS 1. Start native app automation 2.

    webview_ids = d.window_handles() 3. d.window(webview_ids[0]) 4. Automate webview using WebDriver 5. d.execute_script(“mobile: leaveWebView”)
  18. None
  19. Automating Webviews on Android 1. Use webview support desired cap*

    2. d.window(“WEBVIEW”) 3. Automate webview using WebDriver 4. d.window(“NATIVE”)
  20. None
  21. Gestures! Existing WebDriver actions work as expected: But these don’t

    cover all the behaviors we want in a mobile app.
  22. Gestures! For the rest, the temporary solution is to use

    a suite of special methods:
  23. Gestures! Each of these methods takes a certain set of

    parameters, for example: Docs: https://github.com/appium/appium/blob/master/docs/gestures.md
  24. Gestures! Some methods differ across platforms, based on the underlying

    automation APIs. For example, “mobile: shake” currently works only on iOS. Docs: https://github.com/appium/appium/blob/master/docs/gestures.md
  25. Gestures! Methods that deal with x/y coordinates take relative parameters

    (0.0 < X <= 1.0) or absolute pixel values (1 < X) Docs: https://github.com/appium/appium/blob/master/docs/gestures.md
  26. Special UI Elements The values of some special UI elements

    can be set using send_keys()*: * this is currently only supported on iOS
  27. The Future of the Appium API execute_script(“mobile: ...”) is a

    temporary solution to enable all client libraries access to special mobile methods. It is not ideal because it doesn’t provide native client access to those behaviors. Likewise, the difference between Appium’s Android API and Selendroid’s API makes it difficult to write cross-platform hybrid tests.
  28. The Future of the Appium API Appium developers have been

    working with the WebDriver project to make mobile gestures rst-class citizens in the WebDriver clients. We have also been working with other mobile automation frameworks like Selendroid to standardize our APIs. Look for great updates soon!
  29. Questions? @saucelabs | @appiumdevs | @jlipps Promo code: mobilewebinar2 1,000

    free testing minutes
  30. Thanks! @saucelabs | @appiumdevs | @jlipps Promo code: mobilewebinar2 1,000

    free testing minutes We’re hiring! http://saucelabs.com/careers