Book Image

Learning Android Application Testing

Book Image

Learning Android Application Testing

Overview of this book

Table of Contents (16 chapters)
Learning Android Application Testing
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Preface
Index

Performance tests in Android SDK


If the previous method of adding log statements does not suit you, there are different methods of getting performance test results from our application. This is known as profiling.

When running instrumented code (as with our Android instrumented test cases), there is no standard way of getting performance test results from an Android application, as the classes used by Android tests are hidden in the Android SDK and only available to system applications, that is, applications that are built as part of the main build or system image. This strategy is not available for us, so we are not digging deeper in that direction. Instead, we will focus on other available choices.

Launching the performance test

These tests are based on an approach similar to what we just discussed, and they are used by Android to test system applications. The idea is to extend android.app.Instrumentation to provide performance snapshots, automatically creating a framework that we can even...