In this short post, I will introduce you to a few utility methods that might be useful while working with RecyclerView in Espresso Tests.
Introduction In this post, I am assuming that you are already using a RecyclerView in your app.
Frameworks such as Espresso and Mockito provide easy-to-use APIs that make writing tests for various scenarios easier. Let’s cover the fundamentals of testing and frameworks which developers can use to write unit tests.
In the first part of this article we got an introduction about various frameworks available to us for writing tests for an Android app. We also saw some best practices that could be followed to write more testable code.
In app development, a variety of use cases and interactions come up as one iterates the code. The app might need to fetch data from a server, interact with the device’s sensors, access local storage, or render complex user interfaces.