Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Android Testing in Android UI Testing with Espresso Push the Button

Binyamin Friedman
Binyamin Friedman
14,615 Points

So how do I test my app?

I kinda have a couple questions.

I don't understand the point of the view presenter pattern with Mockito. Isn't it pointless to call a method and then check to see if the method was called!? Wouldn't we want to check if the method does the desired intention?

Testing with Robolectric seems easier than Espresso and less complicated. They seem to do the same thing, so is there a benefit to using both of them, as Espresso is on an actual device?

1 Answer

Espresso looks much easier not Robolectric