Android cts测试命令
>adb shell pm list instrumentation(该命令会列出所有已经安装的apk)
instrumentation:com.android.cts.stub/android.content.pm.cts.TestPmInstrumentation (target=android)
instrumentation:com.android.cts.animation/android.test.InstrumentationTestRunner (target=com.android.cts.anima
tion)
instrumentation:com.android.cts.app/android.test.InstrumentationCtsTestRunner (target=com.android.cts.stub)
instrumentation:com.android.cts.os/android.test.InstrumentationCtsTestRunner (target=com.android.cts.stub)
用该命令列出之后,测试单个函数或测试包时要与这里的相对应,如下面的例子所示:
1.cts测试单个函数:
eg:
a.测试testCurrentPlayTime方法
>adb shell am instrument -e class android.animation.cts.ValueAnimatorTest#te
stCurrentPlayTime -w -r com.android.cts.animation/android.test.InstrumentationTestRunner
b.测试testGetMemoryClass方法
>adb shell am instrument -e class android.app.cts.ActivityManagerMemoryClass
Test#testGetMemoryClass -w -r com.android.cts.app/android.test.InstrumentationCtsTestRunner
2.测试整个包
eg:
a.测试Android.animation这个包:
>adb shell am instrument-w -r com.android.cts.animation/android.test.InstrumentationTestRunner
b.测试Android.app这个包:
>adb shell am instrument -w -r com.android.cts.app/android.test.InstrumentationCtsTestRunner
更多相关文章
- android ViewParent requestDisallowInterceptTouchEvent 测试
- 修改Android系统目录的读写权限命令
- android之检查service运行状态函数
- Android Studio 基础 之 一键快速实现一个类的 构造函数、getter
- 谷安: 米国军方的 iOS、Android、Windows Phone 7 测试结果…
- Android Studio如何提示函数用法
- Android Studio怎样提示函数使用方法
- Android shell 下 busybox,clear,tcpdump、、众多命令的移植
- Android性能测试 一些适用于Android Studio的代码审查和性能测试