GMS CTS测试命令汇总

目录

跑CTS之前的准备

样机环境要求

跑各模块版本要求

CTS

简介

复测上轮的失败项

多台设备测试

单跑指定模块和测试用例

GTS

VTS

STS

GSI

获取fingerprint


跑CTS之前的准备

样机环境要求

1、打开stay wake(保持屏幕常亮)、OEM unlocking、USB debugging(设置-开发者选项)

手机进入开发者模式

2、连接网络

3、adb devices   查看设备是否连接上 

4、插入有数据网络的SIM卡 (如有香港网络的卡插入一张)

跑各模块版本要求

测试项目

系统镜像

固件类型

设备状态

备注

CTS

OEM’s system.img

User

Locked

GTS

OEM’s system.img

User

Locked

GSI

GSI

User

Locked

VTS

GSI

User

Unlocked

root权限

STS

OEM’s system.img

Userdebug

Unlocked

root权限

CTS

简介

CTSCompatibility TestSuite的英文简写,意为兼容性测试CTS 测试主要是测试 OEM 厂商设计的 Android 平台是不是符合 Android 的 API 接口定义。通过 CTS 测试不仅可以保证 Android 设备上正常运行,同时,也能够让所有的开发者放心地制作高质量的应用程序,因此只有通过 CTS 认证的设备才能合法的安装使用 Google market 等 Google 应用。

先 ./cts-tradefed

run cts 测试全部

复测上轮的失败项

如果测了大模块,包含多测试项,有多项fail时,可以执行l r指令,查看当前最新的session_id,执行指令复测:run retry --retry <session_id> ,可以复测session_id测试时fail的项目以节省时间。

run retry --retry <session_id>   重试以前会话中失败或未执行的所有测试

run --retry   使用列表结果获取会话id

多台设备测试

多台设备测试:run cts --shard-count 3 --serial 0123456 --serial 123456 --serial 123

更多命令参考:

Android10 GMS测试命令_gms 安卓10-优快云博客

单跑指定模块和测试用例

以下面case为例

  run cts-on-gsi -m CtsKeystorePerformanceTestCases(也可以用 armeabi-v7aCtsKeystorePerformanceTestCases  需要把中间的空格去掉) -t  android.keystore.cts.performance.AttestationPerformanceTest#testEcKeyAttestation

如果test case 太多,可以不加后面的 -t 部分。

GTS

Google Mobile Services Test Suite 意为谷歌移动服务测试套件,谷歌移动服务提供了Search、 Search by VoiceGmailContact Sync、 Calendar SyncTalk、 Maps、 Steet View、 YouTube、 Android Market (Play store)等服务,当用户使用谷歌时,谷歌可以把各种广告嵌入到谷歌的服务中。

先 ./gts-tradefed

run gts   测试全部

VTS

Vendor Test Suite 意为供应商测试套件。以前Android的系统升级是很麻烦的,为了能更快的将设备升级到新的Android版本,Android O 开始新引入了 Project TrebleProject Treble 适用于搭载 Android O 及后续版本的所有新设备。Android 7.x 及更早版本中没有正式的Vendor层接口,因此每次更新系统都相对耗时和困难。Android O 之后,Treble 提供了稳定的Vendor层接口,供设备制造商访问 Android 代码中特定于硬件的部分,这样就可以只更新框架层,减少升级系统带来的成本和困难。为了确保Vendor层实现的前向兼容性,新的Vendor层接口会由供应商测试套件 (VTS) 进行验证,该套件类似于兼容性测试套件 (CTS)

烧录步骤:

VTS :

1. Flash MTK user full load

2. Boot to home screen

3. Settings -> System -> Developer options -> OEM unlocking

4. Reboot phone into fastboot mode by "adb reboot bootloader" or "press volume up key + power key"

5. Connect phone to PC and then type following commands

6. fastboot flashing unlock (press volumn up key)

7. fastboot flash --disable-verity vbmeta vbmeta.img (vbmeta.img is MTK's vbmeta.img. Please get it from MTK load.)

Project which kernel is kernel-4.14 or kernel-4.19:

8. fastboot flash boot boot-debug.img (Please get boot-debug.img from MTK load.)

Project which kernel is kernel-5.10

8. fastboot flash vendor_boot vendor_boot-debug.img (Please get vendor_boot-debug.img from MTK load.)

9. fastboot reboot fastboot

10. fastboot flash system system.img (system.img is GSI.)

11. fastboot reboot

先 ./vts-tradefed

run vts   测试全部

STS

Android Security Test Suite 是谷歌关于android安全补丁安装情况的一个测试套件,STSsecurity patch相关的,是GMS测试新增加的一项安全测试套件。STS201808才开始测试的。Security patch日期在3个月内是GTS的一个case,如果不通过无法获得google认证。

先 ./sts-tradefed

run sts-dynamic-incremental

或者

run sts-dynamic-full

GSI

CTS-ON-GSIGenericSystemImage,Reference AOSP system image 意为通用系统映像上的兼容性测试套件,这个文件包也是签约获取授权后才能获取,Google也会定期更新GSI包。测试工具在Android R 之后用 CTS Tool

该模块是在CTS下跑,跑之前需要刷google的system.img

run cts-on-gsi   全部测试

run cts-on-gsi --shard-count 3 -s GSI00000001 -s GSI00000002 -s GSI00000003

重测命令:run retry -r 1 --shard-count 3 -s GSI00000001 -s GSI00000002 -s GSI00000003 STS测试(单台测试预计7小时)

GSI烧录如下图

1. Flash MTK user full load

2. Boot to home screen

3. Settings -> System -> Developer options -> OEM unlocking

4. Reboot phone into fastboot mode by "adb reboot bootloader" or "press volume up key + power key"

5. Connect phone to PC and then type following commands

6. fastboot flashing unlock (press volumn up key)

7. fastboot reboot fastboot

8. fastboot flash system system.img (system.img is GSI.)

9. fastboot reboot

获取fingerprint

机器过认证时需要让代理机构向google申请白名单和key,申请白名单前需要提供fingerprint

./gts-tradefed

run gts -m GtsEdiHostTestCases

注意:最后一轮时,fingerprint 不能变化。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值