Chapter 2. Understanding Testing with the Android SDK

We now know how to create tests inside an Android project and how to run these tests. It is now time to start digging a bit deeper to recognize the building blocks available to create more useful tests.

In this second chapter, we will be covering the following topics:

  • Common assertions
  • View assertions
  • Other assertion types
  • Helpers to test User Interfaces
  • Mock objects
  • Instrumentation
  • TestCase class hierarchies
  • Using external libraries

We will be analyzing these components and showing examples of their use when applicable. The examples in this chapter are intentionally split from the original Android project that contains them. This is done to let you concentrate and focus only on the subject being presented, ...

Get Learning Android Application Testing now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.