一、电脑环境
1.请下载适用于您的操作系统的 Android SDK 工具包,然后按照附带的 README 文件中的说明进行操作。
安装最新版本的 Android 调试桥 (adb) 和 Android 资源打包工具 (AAPT),并将这两个工具的位置添加到计算机的系统路径中。
2.adb/fastboot更新到30以上,下载地址: https://developer.android.com/studio/releases/platform-tools
3.升级Python版本到3.5以上,下载地址: https://www.python.org/getit/
4.Ubuntu版本需要18.04版本以上
5.从GTS8.0开始,Linux需要JDK9的环境,否则跑不起来,具体参考FAQ23477
二、网络及信号环境
1.IPV6(Internet Protocol Version 6)
手机可访问:Ipv6.google.com
2.IPV4(Internet Protocol Version 4)
手机可访问:www.google.com
3.室内安装GPS信号放大器
三、工具下载及google相关文档地址
1.CTS tool:
https://source.android.com/compatibility/cts/downloads
2.VTS and GSI:
https://support.google.com/androidpartners_gms/answer/9124917?hl=en
3.GTS tool:
https://support.google.com/androidpartners_gms/answer/9124364?hl=en
4.Daily build tool下载地址:
https://partnerdash.google.com/partnerdash/d/partnerandroidbuild#p:id=home&a=543365459
说明:从R开始,CTS-ON-GSI 需要用CTS工具测试
GMS下载:
https://docs.partner.android.com/gms/building/integrating/gms-download?hl=en
Mainline:
https://docs.partner.android.com/gms/building/mainline?hl=en
Google CDD check:
https://source.android.com/compatibility/10/android-10-cdd
GMS Help:
https://docs.partner.android.com/gms?visit_id=637326386359118551-1663118478&rd=1#topic=6167664
Enterprise:
https://support.google.com/androidpartners_gms/answer/7653174?hl=en&ref_topic=7651436#
https://docs.partner.android.com/aer/oem/test
EAP:
https://docs.partner.android.com/gms/resources/eap/upcoming?hl=en
GMS Requirements
https://docs.partner.android.com/gms/resources/reqs?hl=en
Policies:
https://docs.partner.android.com/gms/policies/overview/gms-requirements?hl=en
四、手机设置
1.手机写入SN number/IMEI number/BT/wifi mac地址
2.连接VPN wifi (高速稳定VPN网络)
3.将手机的时间与PC时间调整一致
4.Setting language “English (United States)
5.Settings/about phone/build number 点击多次,开启“开发者模式”
6.Settings/developer options/stay awake --->on
7.Automatic system updates -->off
8.Settings/developer options/USB debugging --->on
9.Settings/developer options/Verify apps over USB --->off
10.Settings/security/screen lock --->None
11.测试CTS/GTS/CTS-ON-GSI 需要拷贝android-cts-media1.4/1.5文件资源
五、gsi和vts测试刷机步骤
GSI
在Development options中打开OEM unlocking
解锁(fastboot flashing unlock)
adb reboot bootloader
fastboot reboot fastboot(该步骤需要将fastboot版本更新到30以上,否则会出现无法找到设备的情况)
fastboot flash system system.img
fastboot reboot bootloader
fastboot -w
fastboot reboot
VTS与GSI步骤基本相同,区别在于VTS需要刷local 版本中的boot-debug.img(fastboot flash boot boot-debug.img)
六、Case要求早知道
Module | 方法 |
CtsTelephonySdk28TestCases | 插入有效SIM卡(确保SIM卡有写入本机号码,能正常发送短信/打电话,确保手机有写入正确的IMEI号) 运营商:中国联通/中国移动/中国电信 |
CtsTelephonyTestCases | |
GtsTelephonyTestCases | |
GtsDialerDeviceTestCases | |
CtsUsageStatsTestCases | |
GtsGmsCoreHostTestCases | |
GtsNmgiarcTestCases | |
VtsHalRadioV1_0Target | |
VtsHalRadioV1_1Target | |
VtsHalRadioV1_2Target | |
VtsHalRadioV1_3Target | |
VtsHalRadioV1_4Target | |
CtsOmapiTestCases | 白卡测试项:插入有效UICC卡(白卡) 必须插入Google 定义的UICC SIM卡才可以pass.(插入卡后,一定要重启手机) (双模需要插入双SIM卡,并设一张为默认SIM卡) 相关资料可以參考 https://source.android.com/compatibility/cts/secure-element 购买渠道: 大陆这边可以联系金雅拓或者蓝源: 金雅拓: https://docs.partner.android.com/gms/testing/cts/cts-faq?hl=en&authuser=2 Where can I get the SIM cards for CTS for Secure Element? Email the following contacts to obtain SIM cards for test purpose:
蓝源: yangbinbin@cn-lanyuan.com
Q版测试对应Q版的白卡 R版测试对应R版的白卡 |
GtsSimAppDialogTestCases | |
CtsSecureElementAccessControlTestCases | |
CtsCarrierApiTestCases | |
VtsHalSecureElementV1_0Target | |
CtsNetTestCases | 连接IPV6网络 |
CtsLibcoreTestCases | |
CtsNetTestCases android.net.cts.ConnectivityManagerTest#testOpenConnection | 插入有效香港SIM卡 (打开mobile data和roaming) |
CtsStatsdHostTestCases | 此模块必须插入有效SIM卡并打开数据连接 |
CtsUsageStatsTestCases | 此模块必须插入有效SIM卡并打开数据连接 P版:插入有效香港SIM卡 |
GtsLocationTestCases | 1.确保VPN wifi网络高速稳定(adb shell ping supl.google.com 可以ping通) 2.确保clock有校准 |
CtsLocationTestCases | |
VtsHalGnssV2_0Target | |
GtsExoPlayerTestCases GtsYouTubeTestCases GtsMediaTestCases | 这几个模块对网速要求很高(高速稳定的VPN网络) 当遇到测试fail的情况下,可以把media文件push到手机SD上(本地播放),然后再测看是否能pass(排除是网络问题) 文件下载地址: https://docs.partner.android.com/gms/testing/gts/running-gts?hl=en |
GtsRegulationComplianceTestCases com.google.android.regulationcompliance.gts.EEAComplianceTest#testEEAv2Compliance | 1.确保VPN网络高速稳定 2.测试之前将手机恢复出厂设置后,手机开机进入向导,连接VPN wifi登录已注册的白名单 Gmail 账号 (注册gmail帐户之后,需要请3PL实验室帮忙添加白名单)后再去测试
3.特别注意搜索引擎务必在开机向导中选择,不能进入系统之后在下拉通知栏的deferred setup中再选. |
GtsDialerDeviceTestCases com.google.android.dialer.gts.GtsDialerDeviceTest#makeCall_verifyDialerWorking | 测试使用可以进行国际拨号的有效SIM卡 (必须开通国际通话服务) |
[CTSV]DeviceSuspendTestActivity com.android.cts.verifier.sensors.DeviceSuspendTestActivity | 1.进工厂模式校准Gsensor到high 2.灭屏待机10分钟以上再去测试此项 (目的就是让后台的活跃应用suspend) |
GtsSettingsTestCases com.google.android.settings.gts.MADAComplianceTest#testMADACompliance | 1.MADACompliance这个测项单纯是用UIAutomator去寻找相应的UI和text,首先要确保系统语言设置的是美式英语
2.在测试之前手动去刷新一下Google Play protect (在system setting里可以找到这个菜单)
3.确保连接高速稳定VPN网络(测此条case网速必须要快&稳) |
CtsPermission2TestCases android.permission2.cts.NoReceiveSmsPermissionTest#testReceiveTextMessage android.permission2.cts.NoReceiveSmsPermissionTest#testAppSpecificSmsToken android.permission2.cts.RestrictedPermissionsTest#shareUidBetweenRestrictedAndNotRestrictedApp | 确保SIM卡写入带+86的本机号码 确保SIM卡能正常发送信息/接收长短信 检查setting里关于SIM卡的设置项里,SMS这一项设定default SMS card(固定到某一张卡) |
[R版]【EEA项目-导航栏花瓣效果】Opa home button animation patch | alps-mp-r0.mssi1 申请patch:ALPS05511712 |
CTS Verifer 11 Condition Provider test | 1.CTS Verifer 11初次启动时和10不一样,不会主动弹出权限弹框给客户点击,需要自己去settings中赋予所有权限,这样后面的测项才能正常执行 adb shell appops set com.android.cts.verifier MANAGE_EXTERNAL_STORAGE 0 3.安装CTSVerifier apk之前要先执行如下命令 |
Camera ITS | ITS测试分为两个部分,PartI和PartII 具体烦请参考FAQ: FAQ21801[ITS]its 文档/工具全集 |