Chapter 5
Espresso
Android apps fail for a number of reasons other than simple logic errors. At its most basic, the app may not install correctly, or there may be a problem when you move from landscape to portrait and back again. Because of fragmentation, the layout might not work on any number of devices that you haven’t had the time to test it on, or it could hang if the network is down.
It’s just not possible to test for these conditions using unit testing. We’re going to have to use another testing tool to test our GUIs (graphical user interfaces) or activities. And, unfortunately, it also means we’re back to using devices and emulators to do our testing.
There are lots of options out there, such as UIAutomator, Calabash, Robotium, and ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access