xts运行命令

1.google原生命令,依赖jdk环境和xts测试套件环境
run cts -m CtsVideoTestCases -t android.video.cts.VideoEncoderDecoderTest#testAvcGoog0Perf1920x1080 -s c1b05
run cts-on-gsi -m CtsMediaTestCases -t android.media.cts.VideoEncoderTest#testOtherH264FlexArbitraryH -s 4868
-a armeabi-v7a
-a arm64-v8a

–retry-strategy RETRY_ANY_FAILURE --max-testcase-run-count X

使用plan跑失败用例
新建androdi-cts/subplans/cts_fail.xml,然后执行
run cts-on-gsi --subplan cts_fail
GSI前面就换成GSI的命令
run cts-on-gsi --subplan cts_fail_400

cts_fail.xml 格式如下

<?xml version='1.0' encoding='UTF-8' standalone='no' ?>
<Included>
	<Entry include="CtsMediaTestCases android.media.cts.MediaCodecTest#testVendorParameters"/>
</Included>

2.只需要xts的apk
例如:
在这里插入图片描述
则先找到xts测试套件中的CtsMediaAudioTestCases.apk并安装 adb install -g CtsMediaAudioTestCases.apk

a.获取instrumentation
adb shell pm list instrumentation
会显示类似以下格式的instrumentation:
android.media.cts/androidx.test.runner.AndroidJUnitRunner
b.构造命令

用例:#后面就是用例名:testAudioRecordLocalMono16Bit 
类:#前面就是类名: android.media.audio.cts.AudioRecordTest, 前面需要添加 " -e class "
模块:adb shell  pm list instrumentation显示的就是模块名, 前面需要添加 " -w "
完整的用例命令格式:
adb shell am instrument -e class class_name#test_name -w instrumentation_name

单个用例:

adb shell am instrument -e class android.media.cts.MediaCodecPlayerTest#testPlaybackSwitchViews -w android.media.cts/androidx.test.runner.AndroidJUnitRunner

单个类:

adb shell am instrument -e class android.media.cts.MediaCodecListTest -w android.media.cts/androidx.test.runner.AndroidJUnitRunner

单个模块:

adb shell am instrument -w android.media.cts/androidx.test.runner.AndroidJUnitRunner

有符号的,需要转义. 或者使用双引号将class引用起来
adb shell am instrument -e class android.mediav2.cts.CodecDecoderTest#testSimpleDecode[63(c2.android.av1.decoder_video/av01)] -w android.mediav2.cts/androidx.test.runner.AndroidJUnitRunner

列举用例名称(不跑), eg列举android.media.decoder.cts.DecoderRenderTest所有用例:

adb shell am instrument -r -e log true -e class android.media.decoder.cts.DecoderRenderTest -w android.media.decoder.cts/androidx.test.runner.AndroidJUnitRunner
  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值