O'Reilly logo

Testing and Securing Android Studio Applications by Antonio Hernández Niñirola, Belén Cruz Zapata

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 the UI

The UI can be evaluated using the white-box testing or black-box testing. In the white-box testing, UI components are checked in the activities that manage them. Activity testing will be explained in the next chapter, that is, Chapter 9, Unit and Functional Tests. The black-box testing is based on the uiautomator API. This API includes classes to capture and manipulate components in the application under test. This type of test does not require you to know the internal implementation of the application.

Android Studio does not directly support the uiautomator framework, but since it is available in the Android SDK, we can use it anyway. The steps to complete the testing process are as follows:

  1. Install the application under test on ...

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