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平台开发-Power management-电源管理
- Android(安卓)两种方式优雅实现按钮防重复点击,防抖功能
- Android下的junit 单元测试
- Android(安卓)加载图片文件 函数
- USB UMS MTP设置过程 (一)
- 客户端性能测试
- Android(安卓)Binder 机制详解
- android recovery 模式启动进入流程
- 箭头函数的基础使用