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

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值