O'Reilly logo

Android Application Testing Guide by 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

This section shows some examples of activities and applications tests. They cover some common cases that you will find in your day-to-day testing and you can adapt them to suit your specific needs.

Applications and preferences

In Android parlance, application refers to a base class used when it is needed to maintain a global application state. This is usually utilized for dealing with shared preferences. We expect that tests altering these preferences' values don't affect the behavior of the real application. Imagine the tests deleting user account information for an application storing these values as shared preferences. It doesn't sound like a good idea. So what we really need is the ability to mock a Context ...

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