Slide 1

Slide 1 text

Android UI Testing & Challenges. Merab Tato Kutalia Android GDE, Chapter Lead & TBC Bank @TatoKutalia

Slide 2

Slide 2 text

Tools ● UIAutomator ● Espresso

Slide 3

Slide 3 text

Espresso ● Runs on device/emulator ● High speed and stability ● Test Recorder ● Tooling ● Scaling

Slide 4

Slide 4 text

Espresso How it works Espresso handles a low-level task — it finds the required element on the screen according to the specified parameters (ViewMatcher), and executes an action with it (ViewAction) or performs a check (ViewAssertion).

Slide 5

Slide 5 text

No content

Slide 6

Slide 6 text

No content

Slide 7

Slide 7 text

No content

Slide 8

Slide 8 text

No content

Slide 9

Slide 9 text

No content

Slide 10

Slide 10 text

Espresso How it works All Espresso commands are executed in the same process in which the application under test is running. Conditions to be met: The message queue is empty. There are no instances of AsyncTask currently executing a task. All developer-defined idling resources are idle.

Slide 11

Slide 11 text

Espresso MessageQueue

Slide 12

Slide 12 text

Demo

Slide 13

Slide 13 text

Espresso scenarios ● ActivityScenario ● FragmentScenario

Slide 14

Slide 14 text

Espresso ● IdlingResource?

Slide 15

Slide 15 text

Scaling ● CI (Firebase Test Lab + other vendors) ● Test Sharding

Slide 16

Slide 16 text

Common challenges ● Navigation ● Deeplinks ● Analytics ● Backups

Slide 17

Slide 17 text

Resources ● Medium blog ● Espresso docs ● Sharding ● Setup emulator for testing ● Flank ● ConditionWatcher

Slide 18

Slide 18 text

Thanks