Guest User

Untitled

a guest
Jan 17th, 2019
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.49 KB | None | 0 0
  1. Android's Espresso framework was created as a "gray-box" testing framework, with the intent of improving testing
  2.  
  3. Like how the Espresso framework improved upon UiAutomator2, the Appium Espresso driver brings with it several improvements over the Appium UiAutomator2 driver
  4.  
  5. * Less flakiness thanks to IdlingResource
  6. * Espresso uses a thing called `IdlingResource`. Explain breifly what that is
  7. * What this means is that Espresso blocks on the UI thread until it's idle
  8. * Mention the downside is that it might be stuck, and never not be idle. Appium Espresso Driver does disable animations though
  9. * Use-case: Give an example in UiAutomator2 that shows waits, delays, etc.... then show an example in Espresso that takes those out
  10.  
  11. * Access to the internals of the app
  12. * The Espresso framework is "gray-box", which means that we can access the internals of the application, unlike UiAutomator2
  13. * This allows us access to internals of the application
  14. * Briefly mention the `mobile: backdoor` method
  15. * Use case: `view-tag` selector. React Native testers wanted the ability to select items by `view-tag` because they didn't want to pollute the accessibility tag with data that would confuse people using screen-readers.
  16.  
  17. * WebAtoms
  18. * Explain the Chromedriver problems we've had and the version mismatching, and the problem with finding/setting the context
  19. * Mention how sometimes all you need to do is simply input a username and password and press submit
  20. * Explain what WebAtoms are
  21. * The `mobile: webAtoms` endpoint gives you the ability to get through this
  22. * Use-case: A native app that uses OAuth and needs to enter username and password into a webview. Show WebAtoms example of enterring username and password.
  23.  
  24. * Find elements off-screen
  25. * UiAutomator2 is constrained to selecting elements that are inside of the viewport
  26. * Finding elements off-screen requires scrolling, checking, scrolling-again until the element is in viewport (show code example)
  27. * Using Espresso's `onData` matcher, we can target elements off-screen
  28. * Explain how it uses `Adapter`
  29. * Use-case: Write a data matcher for an element that is an Adapter item and is off-screen
  30.  
  31. * You can still use UiAutomator
  32. * The one caveat of all of this, is that you can only run Espresso tests on the AUT (app-under-test)
  33. * Espresso can't be run on other apps because the other apps are signed
  34. * No problem, we have the `mobile: uiautomator2` endpoint to take care of those cases
  35. * Give an example use-case of having to navigate an external app
Add Comment
Please, Sign In to add comment