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

Advanced Mobile Testing on Sauce Labs

Sauce Labs
September 19, 2013

Advanced Mobile Testing on Sauce Labs

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. 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
  5. Android support works the same way as iOS, but with

    a different set of desired capabilities.
  6. Review: Sending apps to Sauce Host the app on the

    web Use the Sauce Storage API https://saucelabs.com/docs/rest#storage 1. 2.
  7. 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
  8. 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”)
  9. Automating Webviews on Android 1. Use webview support desired cap*

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

    cover all the behaviors we want in a mobile app.
  11. Gestures! Each of these methods takes a certain set of

    parameters, for example: Docs: https://github.com/appium/appium/blob/master/docs/gestures.md
  12. 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
  13. 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
  14. Special UI Elements The values of some special UI elements

    can be set using send_keys()*: * this is currently only supported on iOS
  15. 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.
  16. 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!
  17. Thanks! @saucelabs | @appiumdevs | @jlipps Promo code: mobilewebinar2 1,000

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