The following is the first few sections of a chapter from The Busy Coder's Guide to Android Development, plus headings for the remaining major sections, to give you an idea about the content of the chapter.


Testing with UI Automator

Yet another approach for testing Android applications is UI Automator. This is designed for integration testing, both how your app components integrate with one another (e.g., activities starting activities) and how your app components integrate with the rest of a device, including other applications.

This is tied into the same instrumentation testing engine that is used for JUnit4 testing, so your plain JUnit4 tests, your Espresso-based tests, and your UI Automator tests can all work in tandem.

Prerequisites

This chapter assumes that you have read the chapter on JUnit4.

What Is UI Automator?

The preview of this section is unavailable right now, but if you leave your name and number at the sound of the tone, it might get back to you (BEEEEEEEEEEEEP!).

Why Choose UI Automator Over Alternatives?

The preview of this section was stepped on by Godzilla.

Gradle and Android Studio Settings

The preview of this section was whisked away by a shark-infested tornado.

Creating a Test Case

The preview of this section was lost in the sofa cushions.

Performing Device-Level Actions

The preview of this section was lost due to a rupture in the space-time continuum.

Starting Your Activity

The preview of this section left for Hollywood to appear in a reality TV show.

Getting Proxies for Widgets and Containers

The preview of this section apparently resembled a Pokémon.

Interacting with Widgets

The preview of this section is [REDACTED].

Asserting Conditions

The preview of this section is out seeking fame and fortune as the Dread Pirate Roberts.

Running Your Tests

The preview of this section was abducted by space aliens.

Finding Your Widgets

The preview of this section was accidentally identified as an Android 'tasty treat' by the Cookie Monster.

Using the UI Automator Viewer

The preview of this section was stepped on by Godzilla.