Although considered separately here, instrumented tests can also be unit tests. There are many non-UI Android classes that we need to test against, and although these can be mocked up, this can be a time-consuming process, particularly when we know these classes are sitting there, already fully implemented on our devices and emulators. If we are prepared to sacrifice the fast build times of mock testing, then we might as well plug in our devices and boot up our emulators.
One aspect of development that is difficult to mock is UI simulation and interaction, and generally speaking, when we want to test our layouts against physical gestures. Fortunately, there are some very handy tools and features at our disposal that help test and optimize our designs.