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.
@vgonda Can you please help with this when you get a chance? Thank you - much appreciated! :]
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!