MTK cts测试注意事项

CTS跑多项:
1.新建文件,例如:CtsStatsdHostTestCases.xml  armeabi-v7a根据html报告来


  
  
  


2.android-cts目录新建subplans目录将步骤1的文件放在下面
3.run cts --subplan CtsStatsdHostTestCases -s +手机sn号

STS用userdebug版本

BTS扫描用user版本

google源码地址(可查询google提交记录):https://android.googlesource.com/platform

google patch地址:https://source.android.com/security/bulletin

查询google某个patch:https://nvd.nist.gov/vuln/detail/CVE-2022-22822

goole源码无需外网(非最新代码)Google Play 上的过滤器  |  Android 开发者  |  Android Developers

一、电脑环境

1.请下载适用于您的操作系统的 Android SDK 工具包,然后按照附带的 README 文件中的说明进行操作。

安装最新版本的 Android 调试桥 (adb) 和 Android 资源打包工具 (AAPT),并将这两个工具的位置添加到计算机的系统路径中。

2.adb/fastboot更新到30以上

下载地址: https://developer.android.com/studio/releases/platform-tools

3.升级Python(Python 2.7将于2020年1月1日之后不再维护,pip的未来版本将不再支持Python 2.7),请升级python版本到3.5以上

下载地址: Download Python | Python.org

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信号放大器

三、工具下载地址

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

S-EAP:

https://partner.android.com/build/builds;branch=git_sc-release;product=test_suites_arm64?a=180356357

5.Partner Android Build (PAB)

PAB is Android daily build package for xTS test suite

You can use the latest version of PAB to verify your issue was fixed or not

说明:从R开始,CTS-ON-GSI 需要用CTS工具测试

四、手机设置

1.手机写入SN number/IMEI number/BT/wifi mac地址

2.连接VPN wifi (高速稳定网络)

3.将手机的时间与PC时间调整一致

4.关闭工模下的MoMs(EngineerMode-->other-->MoMs-->Disable MoMs for CTS Test)

5.Setting language “English (United States)

6.Settings/display/font size,系统字体大小设置成normal

7.Settings/about phone/build number 点击多次,开启“开发者模式”

8.Settings/developer options/stay awake “on”

9.Settings/developer options/USB debugging “on”

10.Settings/developer options/Verify apps over USB “off”

11.Settings/security/screen lock “None”

12.测试CTS/CTS-ON-GSI 需要拷贝android-cts-media1.5文件

五、Q版自动测试命令集合

MTK cts测试注意事项_第1张图片

注意:STS retry时,下发retry指令时不能加-o这个参数;

六、刷GSI image

Q版本在刷GSI时,请务必严格参考FAQ: 

FAQ22274,FAQ22665

R版本在刷GSI时,请务必严格参考FAQ:

说明:R上面不支持GKI

七、Case注意事项

Module 方法
CtsTelephonySdk28TestCases

插入有效SIM卡(确保SIM卡有写入本机号码,能正常发送短信/打电话,确保手机有写入正确的IMEI号)

运营商:中国联通/中国移动/中国电信
(双模需要插入双SIM卡,并设一张为默认SIM卡)


 

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:

蓝源:

[email protected]

Q版测试对应Q版的白卡

R版测试对应R版的白卡

GtsSimAppDialogTestCases
CtsSecureElementAccessControlTestCases
CtsCarrierApiTestCases
VtsHalSecureElementV1_0Target
CtsNetTestCases 连接IPV6网络
CtsLibcoreTestCases

CtsNetTestCases

android.net.cts.ConnectivityManagerTest#testOpenConnection

插入有效香港SIM卡

(打开mobile data和roaming)

CtsTelephonyTestCases android.telephony.cts.SmsUsageMonitorShortCodeTest#testSmsShortCodeDestination

1.恢复出厂

2.开机引导不联网

3.直接连自己的热点设置手机

然后开始测试

CtsHostsideNetworkTests 

请连接VPN  wifi,插入有效SIM卡(能正常打电话、发送短信)并打开数据连接

运营商:中国联通/中国移动/中国电信
(双模需要插入双SIM卡,并设一张为默认SIM卡)

CtsNetTestCasesLegacyApi22

CTSV

unlockedDeviceRequired

这一项不需要设置指纹

请按以下步骤测试:

1.setting/security/screen lock/pattern 、PIN or password (设置一个屏幕锁)

2.Unlocked Device Required /start test/灭屏5秒

3.然后打开屏幕,解锁后即可pass

CtsAppSecurityHostTestCases

需要插入高速SD/TF卡

CtsJobSchedulerTestCases

 此模块必须插入有效SIM卡并打开数据连接

(双模需要插入双SIM卡,并设一张为默认SIM卡)

CtsStatsdHostTestCases
CtsVcnTestCases
CtsUsageStatsTestCases

此模块必须插入有效SIM卡并打开数据连接

P版:插入有效香港SIM卡

GtsLocationTestCases

1.确保VPN wifi网络高速稳定(adb shell ping supl.google.com 可以ping通)

2.确保clock有校准
3.GPS能够搜索到星(至少五颗以上绿色的星星)
4.室内安装GPS信号放大器
以上条件确保没有问题后,再去测试

CtsLocationTestCases
VtsHalGnssV2_0Target   

GtsExoPlayerTestCases

GtsYouTubeTestCases

GtsMediaTestCases

这几个模块对网速要求很高(高速稳定的VPN网络)

当遇到测试fail的情况下,可以把media文件push到手机SD上(本地播放),然后再测看是否能pass(排除是网络问题)

1.文件下载地址:

Downloads

  • GtsExoPlayerTestCases media files Download (12 GB)
  • GtsYouTubeTestCases media files Download (419 MB)
  • GtsMediaTestCases media files Download (11.4 GB)

https://docs.partner.android.com/gms/testing/gts/running-gts?hl=en

2.将下载的文件push到 SD 卡上,请使用以下命令:

adb push gts test wvmedia /sdcard/

3.对应命令:

run gts -m GtsExoPlayerTestCases --module-arg GtsExoPlayerTestCases:config-url:https://storage.googleapis.com/exoplayer-test-media-1 gen-4 dynamic-config-sdcard-1.0.json 

run gts -m GtsYouTubeTestCases --module-arg "GtsYouTubeTestCases:skip-media-download:true" --module-arg "GtsYouTubeTestCases:instrumentation-arg:media-path:=/sdcard/test"

run gts -m GtsMediaTestCases --module-arg "GtsMediaTestCases:instrumentation-arg:media-path:=file:///sdcard/wvmedia"

GtsRegulationComplianceTestCases

com.google.android.regulationcompliance.gts.EEAComplianceTest#testEEAv2Compliance

1.确保网络高速稳定

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.确保连接高速稳定网络(测此条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

GtsRegulationComplianceTestCases

com.google.android.regulationcompliance.gts.RUComplianceTest#testRUCompliance

俄罗斯项目,跑此case的时候会启动chrom 浏览器,在这个界面点击next

按照官方的GTS测试前手机设置,是需要手动去点掉这些画面的

https://support.google.com/androidpartners_gms/answer/9382926?hl=en&ref_topic=9382925

Launch the browser and dismiss any startup/setup screen.

CTS Verifer 

Condition Provider test
Notification Listener Test

 从R版开始:

1.CTS Verifer 11初次启动时和10不一样,不会主动弹出权限弹框给客户点击,需要自己去settings中赋予所有权限,这样后面的测项才能正常执行
2.导出报告要执行如下两个命令:adb shell appops set com.android.cts.verifier android:read_device_identifiers allow

adb shell appops set com.android.cts.verifier MANAGE_EXTERNAL_STORAGE 0

3.安装CTSVerifier apk之前要先执行如下命令
adb shell settings put global hidden_api_policy 1
否则这两项测不过
Condition Provider test
Notification Listener Test

从S版开始:

测试Notification Listener Test之前必须设置Lock screen

1.setting/security/screen lock(Pattern&PIN&Password)任意设置一种

2.选择Show all notification content.

 Camera CTS issue

metadata相关的配置问题

参考:

MTK DCC: Smartphone/HW/Common Design Notes/Camera/Common/Camera Basic Guide/04_Camera _MiddleWare

MTK online HAL3:http://online.mediatek.com/QuickStart/QS00137

MTK online FAQ:http://online.mediatek.com/FAQ

CTSV 

MIDI Test

1.需要购买专用设备

五针五芯MIDI连接线

https://detail.tmall.com/item.htm?id=563300901607&spm=a1z09.2.0.0.792a2e8d5THfFm&_u=adnum7c7290

无线 MIDI 适配器MDBT01 MD-BT01

https://source.android.com/compatibility/cts/cts-midi

2.需要安装专用apk

com.mobileer.example.midibtlepairing_com.mobileer.example.midibtlepairing.apk

google play里面也可以安装

MD-BT01购买链接:

Amazon.com

MD-BT01 - Overview - Accessories - Synthesizers & Music Production Tools - Products - Yamaha USA

Google官网

https://source.android.com/compatibility/cts/cts-midi

CtsSkQPTestCases

org.skia.skqp.SkQPRunner#unitTest_WritePixelsPendingIO

此模块(CtsSkQPTestCases)必须单跑(不能单测)

CtsOsTestCases 

android.os.cts.CompanionDeviceManagerTest#testRequestNotifications

测试时旁边多放一台打开蓝牙的手机(测试机和辅助机都要打开蓝牙)

CTSV

Companion Device Service Test

请用蓝牙耳机(支持BLE,BR/EDR)

1. Android CtsVerifier.apk(adb install -r -g CtsVerifier.apk)

2. DUT turns on bt, there needs to be a BT device around during the test (I use airpods for testing (please make sure your test device can send BLE broadcast and br/edr broadcast at the same time))

3. Click "Companion Device Service Test"

4. Click "GO", then click "airpods" in the pop-up window

5. A few seconds later, a pop-up box will pop up "Device appeared xx:xx:xx:xx:xx:xx", and then power off airpods (close the earphone box and leave the airpods in the off state)

6. A few seconds later, a pop-up box will pop up "Device disappeared xx:xx:xx:xx:xx:xx" and then click "DEVICE GONE"

7.power on airpods (open the earphone box so that the airpods can be scanned)

8. A few seconds later, a pop-up box will pop up "Device appeared xx:xx:xx:xx:xx:xx", then click "DEVICE PRESENT"

9. Finally click on the "green tick", and test pass

VTS:

VtsHalSecureElementV1_0Target

CTS:

CtsSecureElementAccessControlTestCases1

CtsSecureElementAccessControlTestCases2

CtsSecureElementAccessControlTestCases3

signed-CtsSecureElementAccessControlTestCases1

signed-CtsSecureElementAccessControlTestCases2

signed-CtsSecureElementAccessControlTestCases3

CtsOmapiTestCases

遇到CtsOmapiTestCases /VtsHalSecureElementV1_0Target  fail case解决方法:

确认MTK_OMAPI_SUPPORT 是否设定为Yes, 以及sim 卡是否符合Google 的規定

https://source.android.com/compatibility/cts/secure-element

确认是否客制化将 packages/apps/SecureElement 移除或沒有安裝 SecureElement.apk ?

从Android P Google 开始实作 OMAPI

https://android-developers.googleblog.com/2018/03/previewing-android-p.html

https://developer.android.com/reference/android/se/omapi/package-summary

为了支持 Android P/Q OMAPI

MTK_OMAPI_SUPPORT 是开启 MTK 对于 UICC 的 HIDL 实作

若沒开启, 预期也要能找到 SecureElementService 才能 pass 

Camera ITS

ITS测试分为两个部分,PartI和PartII

 具体烦请参考FAQ:

FAQ21801[ITS]its 文档/工具全集

FAQ21525【CTS_Verify】CameraITS测试注意事项

.报告说明:

Ignored: means that the test did not run at all and was completely skipped.
Assumption Failure:means that some precondition of the test isn't met and the test was aborted.

Both Ignored and Assumption Failure are treated as Pass
https://docs.partner.android.com/gms/testing/gts/running-gts?hl=en

九、Google官方相关地址

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

你可能感兴趣的:(android,cts,cts)