Android performance testing using "android.test.PerformanceTestCase" interface

I am trying to test performance of an android application using "android.test.PerformanceTestCase" interface , can anyone tell me how to make use of it...

I know i can use Traceview tool to test performance but i want learn to use "android.test.PerformanceTestCase" interface provided by android.

If i get any example code it will be very much helpful


Asked by: Tess973 | Posted: 24-01-2022






Answer 1

Download the Android source code and look in frameworks/base/tests/AndroidTests/src/com/android/unit_tests. You'll find a lot of PerformanceTestCase examples.

Answered by: Kirsten612 | Posted: 25-02-2022



Answer 2

I cloned the android source looking for the files suggested by Mirko's answer. The repository is very large and took me a while to clone. I searched it for all instances of PerformanceTestCase and found the following files which implement it:

/base/graphics/tests/graphicstests/src/android/graphics

/base/test-runner/src/android/test

/base/core/tests/coretests/src/android/app/activity

/base/core/tests/coretests/src/android/util

/base/core/tests/coretests/src/android/database

/base/core/tests/coretests/src/android/view

Note that incase some of these change or are moved in the future, the commit hash I searched today was ce7dba6bdf2345f39ad8f39b8a4c1bac9bcd35ea

Answered by: Oliver799 | Posted: 25-02-2022



Similar questions





Still can't find your answer? Check out these communities...



Android Google Support | Android Community | Android Community (Facebook) | Dev.io Android



top