This course contains a combination of theory and exercises designed to get you started with the Espresso UI automation framework for Android, and show you a few of the features that make Espresso stand out from other frameworks.

Code level: basic
The code you will be writing during this course will be basic and aimed at showcasing different Espresso capabilities and features.


– The code you will be writing is going to be simple and focussed on using the Espresso API. You will not be taught how to apply design patterns to your code during this course, or how to write good test cases for automation.

– If you’re looking to use Espresso on a professional level, I suggest you read up on the ‘robot pattern’, ‘page object pattern’ or ‘screenplay pattern’ to structure your test automation code and implement the right level of abstraction.

– The content of this course was adapted from a 3 hour workshop that I first gave at Saucecon 2019 in Austin. As the requirements for an online course differ from the requirements for a hands-on workshop, some things in this course may not be entirely clear without explanation. If they aren’t, it would help me tremendously if you could let me know! Thanks!

Course Contents

The following subjects will be covered:

  1. Getting started
    – Project Setup
    – Terminology: Activities and views
    – Basic Test Setup
  2. Finding the right IDs
    – Layout Inspector
    – Exercise 1
  3. Espresso Core API
    – Matchers
    – Exercise 2
  4. Automating RecyclerViews
    – Testing RecyclerViews with Espresso
    – Exercise 3
  5. Using Code from the App
    – Shared Preferences
    – Editing the TestRule
    – Exercise 4
  6. Intents
    – Terminology: Intents
    – Exercise 5

Continue with part 1: Getting Started