O'Reilly logo

Learning Android Application Testing by Paul Blundell, Diego Torres Milano

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

Testing activities and applications

Here, we cover some common cases that you will find in your day-to-day testing, including dealing with Intents, Preferences, and Context. You can adapt these patterns to suit your specific needs.

Mocking applications and preferences

In Android parlance, an application refers to a base class used when it is needed to maintain a global application state. The full package is android.app.Application. This can be utilized when dealing with shared preferences.

We expect that the tests that alter these preferences' values will not affect the behavior of the real application. Without the correct testing framework, the tests could delete user account information for an application that stores these values as shared preferences. ...

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