Espresso Testing and Screen Robots: Getting Started | raywenderlich.com

In this Espresso testing tutorial you’ll learn how to create UI tests with Espresso and how to leverage Screen Robots to make them clear and maintainable.


This is a companion discussion topic for the original entry at https://www.raywenderlich.com/949489-espresso-testing-and-screen-robots-getting-started
1 Like

Thank you for this great tutorial. What do you think of writing such tests with Robolectric Android_x: AndroidX Test | Robolectric

It seems like the same functionality could be accomplished, and the tests would run faster on the JVM.

1 Like

@vgonda Can you please help with this when you get a chance? Thank you - much appreciated! :]

1 Like

I’m glad you enjoyed it!

Yes! You’re exactly right that you can perform the same Espresso tests on the JVM using Robolectric an AndroidX Test. There are two trade offs to keep in mind when using this option:

  • The Android framework is mocked, so while it behaves just about the way you’d think, you still should keep it in mind.
  • I don’t think things like sensors and GPS are available using this Espresso + AndroidX Test + Robolectric.

For most cases, I doubt any of these would be an issue. Thank you for bringing it up, @igorganapolsky !

Great. Awesome Tutorial. It made my concepts clear. Thanks for sharing ScreenRobots.

@sujatas Really glad you like it! :]

Thanks for reading! I’m glad you found it helpful, @sujatas

This tutorial is more than six months old so questions are no longer supported at the moment for it. Thank you!