Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Android Espresso

1,712 views

Published on

Una breve presentación para presentar aspectos básicos del uso de Android Espresso para la automatización de pruebas de interfaz de usuario

Published in: Software
  • DOWNLOAD FULL BOOKS, INTO AVAILABLE FORMAT ......................................................................................................................... ......................................................................................................................... 1.DOWNLOAD FULL. PDF EBOOK here { https://tinyurl.com/y6a5rkg5 } ......................................................................................................................... 1.DOWNLOAD FULL. EPUB Ebook here { https://tinyurl.com/y6a5rkg5 } ......................................................................................................................... 1.DOWNLOAD FULL. doc Ebook here { https://tinyurl.com/y6a5rkg5 } ......................................................................................................................... 1.DOWNLOAD FULL. PDF EBOOK here { https://tinyurl.com/y6a5rkg5 } ......................................................................................................................... 1.DOWNLOAD FULL. EPUB Ebook here { https://tinyurl.com/y6a5rkg5 } ......................................................................................................................... 1.DOWNLOAD FULL. doc Ebook here { https://tinyurl.com/y6a5rkg5 } ......................................................................................................................... ......................................................................................................................... ......................................................................................................................... .............. Browse by Genre Available eBooks ......................................................................................................................... Art, Biography, Business, Chick Lit, Children's, Christian, Classics, Comics, Contemporary, Cookbooks, Crime, Ebooks, Fantasy, Fiction, Graphic Novels, Historical Fiction, History, Horror, Humor And Comedy, Manga, Memoir, Music, Mystery, Non Fiction, Paranormal, Philosophy, Poetry, Psychology, Religion, Romance, Science, Science Fiction, Self Help, Suspense, Spirituality, Sports, Thriller, Travel, Young Adult,
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • DOWNLOAD FULL BOOKS, INTO AVAILABLE FORMAT ......................................................................................................................... ......................................................................................................................... 1.DOWNLOAD FULL. PDF EBOOK here { https://tinyurl.com/y6a5rkg5 } ......................................................................................................................... 1.DOWNLOAD FULL. EPUB Ebook here { https://tinyurl.com/y6a5rkg5 } ......................................................................................................................... 1.DOWNLOAD FULL. doc Ebook here { https://tinyurl.com/y6a5rkg5 } ......................................................................................................................... 1.DOWNLOAD FULL. PDF EBOOK here { https://tinyurl.com/y6a5rkg5 } ......................................................................................................................... 1.DOWNLOAD FULL. EPUB Ebook here { https://tinyurl.com/y6a5rkg5 } ......................................................................................................................... 1.DOWNLOAD FULL. doc Ebook here { https://tinyurl.com/y6a5rkg5 } ......................................................................................................................... ......................................................................................................................... ......................................................................................................................... .............. Browse by Genre Available eBooks ......................................................................................................................... Art, Biography, Business, Chick Lit, Children's, Christian, Classics, Comics, Contemporary, Cookbooks, Crime, Ebooks, Fantasy, Fiction, Graphic Novels, Historical Fiction, History, Horror, Humor And Comedy, Manga, Memoir, Music, Mystery, Non Fiction, Paranormal, Philosophy, Poetry, Psychology, Religion, Romance, Science, Science Fiction, Self Help, Suspense, Spirituality, Sports, Thriller, Travel, Young Adult,
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here

Android Espresso

  1. 1. Android Espresso +ArmandoPicon @devpicon
  2. 2. ¿Qué es Espresso? ● Es una característica del Android Testing Support Library ● Simula interacciones del usuario ● Sincronización automática de acciones de los tests con la interfaz de usuario
  3. 3. Espresso - Básicos onView(ViewMatcher) .check(ViewAssertion);
  4. 4. Espresso - Básicos onView(withId(R.id.txt_helloworld)) .check(ViewAssertion);
  5. 5. Espresso - Básicos onView(withId(R.id.txt_helloworld)) .check(matches( withText(R.string.hello_world) ));
  6. 6. Espresso - Básicos onView(ViewMatcher) .perform(ViewAction) .check(ViewAssertion);
  7. 7. Espresso - Básicos onView(withId(R.id.button_clickme)) .perform(ViewAction) .check(ViewAssertion);
  8. 8. Espresso - Básicos onView(withId(R.id.button_clickme)) .perform(click()) .check(ViewAssertion);
  9. 9. Espresso - Básicos onView(withId(R.id.button_clickme)) .perform(click()) .check(matches(not(isEnabled())));
  10. 10. Este y otros ejemplos: github.com/apiconz/espresso-ejemplos
  11. 11. Librería Espresso onView(withId(R.id.button_clickme)) .perform(click()) .check(matches(not(isEnabled())));
  12. 12. Hamcrest onView(withId(R.id.button_clickme)) .perform(click()) .check(matches(not(isEnabled())));
  13. 13. Espresso https://code.google.com/p/android-test-kit/wiki/EspressoV2CheatSheet
  14. 14. Hamcrest http://www.marcphilipp.de/blog/2013/01/02/hamcrest-quick-reference/
  15. 15. Manos a la obra!
  16. 16. Receta 1. Agregamos dependencias en gradle 2. Declaramos el Instrumentation Runner en defaultConfig 3. Desactivamos animaciones en el dispositivo 4. Creamos una clase con las anotaciones @RunWith y @LargeTest 5. Declaramos la regla con la anotación @Rule 6. Escribimos nuestro test @Test
  17. 17. Este y otros ejemplos: github.com/apiconz/espresso-ejemplos
  18. 18. Gracias! @devpicon +ArmandoPicon github.com/apiconz apiconz.blogspot.com

×