O'Reilly logo

Mastering Android Studio 3 by Kyle Mew

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Recording tests

In the preceding section we saw how Android Studio provides a comprehensive set of tools for testing our code, but writing these tests is time consuming, and with anything other than the most trivial of projects will require many individual tests. Fortunately, Android Studio provides a semi-automated way to construct tests, using our own UI interactions to create, identify, and perform code elements of the test.

The following simple exercise shows how this is done to perform the preceding test we just wrote by hand:

  1. Open the project with the spinner we created in the previous exercise, or create a new one.
  2. Select Record Espresso Test from the Run menu.
  3. Select an item from the spinner. This will be reflected in the Record ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required