
GMSTestSuiteUserGuide中文.pdf
8页Google Mobile Services Test Suite (GTS) (GMS 测试套件测试套件) 介绍介绍 GMS 是由 Google 提供的基于 Android Application Framworks 应用和服务的软件集合, GTS 是 用于 GMS 应用的测试的自动化的测试套件, 包含 Google Play Video 支持的分辨率和比特率 的视频的测试内容,GTS 测试需要 Android 4.0 以上的系统的 GMS 纵览纵览 包括两个测试组成部分 1. test harness 测试工具: GTS 测试使用 Tradefed (它也用于 CTS(Android Compatibility Test Suite)测试) Tradefed 它运行于 Linux 桌面机并管理测试程序的运行 2. GTS 测试用例(test case) : GTS test 测试用例是运行在设备或模拟器上的测试程序,由 Java 程序编写打包成 apk 包 测试环境建立和流程:测试环境建立和流程: 1 把 GTS 释放到 Linux 桌面机里面 2. 测试环境:高速和稳定的网络连接是成功测试的关键基础 建议建立一个专门的 wifi 网络来用于这个测试 3. 安装和配置 GTS a). 把一台机子连接到 Linux 桌面机子上 b)GTS 只能运行在 Android device 上面 i 你的一定得使用来自的user build 程序(Android 4.0 以上) ii 在 GTS 测试之前,确定你的设备已经烧录了 user build 程序(Android 4.0 以上). c). GTS 测试程序在必要的时候, 会做 screenshot 和重启设备, 所以要先去掉所以有干扰 的设置: i. SIM PIN lock(SIM 卡 pin 锁) ii. Screen lock(屏锁) iii. Display > Sleep > 10 minutes (睡眠) iv. Security > Verify apps on 4.2+ devices d) 启动 GTS i. CTS 测试工具会把 test plan 传给连接的 android 系统设备上 ii. To run GTS test plan 启动 GTS 测试 test plan 1. 首先确定有一个 Android 系统设备已经通过 adb 连接到了 PC 机,键入: ./android- xts/tools/xts- tradefed 2. 启动 GTS test plan 通过键入: run xts - - plan XTS 开始全部的 GTS 测试包的测试 3. 另外一个可选启动方法是: ./android- xts/tools/xts- tradefed run xts - - plan XTS iii. 1. 你能通过终端看到测试的进程和结果的报告 e. 测试工具在被测设备上运行 GTS 测试程序, 包括执行 video 测试, 并记录测试结果. 测试工具的在连接的 Android device 上运行了 GTS 测试程序,包括视频测试和记 录测试结果 iv. Test Results 测试结果 a. 一旦测试完成你可以通过浏览器看测试结果 b. 上传测试结果: 用 Google 的账号登录 Android Partner Frontend(http: //),打开后把结果上传给服务器。
要先确定用于测试的 Google 账号是可 以进入 Android Partner Frontend. Upload GTS test result into Android Partner Frontend, 然后可以使用 web 界面或者 Android Parner API 来 上传测试结果 设置和使用设置和使用 GTS 1. 测试 GTS 前,要先保证系统安装有较新的 adb 程序. 2. 按照 adb 的方法:先下载并安装 the Android SDK tools. 然后再把 SDK Platform tools Component 加进来. 3. 保证 'adb' 程序在你的系统路径下:. 例如: export PATH=$PATH:/home/myuser/android- sdk- linux_x86/platform- tools 解释测试结果:解释测试结果: 测试结果文件在$XTS_ROOT/repository 下, the testResult.xml 文件包含实际测试结果. ● 'device information' 部分给出了 make, model 和 Android platform 版本的细节. ● 'package information' 部分包括了 Android 和 GMS packages 包列表. 从 1.5 版开始, APK 的版本和 system flag 被列出 , 如: ● System Libraries, Vendor Libraries, Wievine Libraries 和 Framework Jars 的 checksum 是: ● GMS 相关属性列出, 如: ● Camcoder Profiles 被列出. GTS 使用 CamcoderProfile API 获得这些信息的. 如: ● JB (4.1) 以上MediaCodec Profiles 被列出. GTS 使用 MediaCodecInfo API(API level 16) 获 得这些信息的. 如: ● 在提交 GTS report 之前, 你需要确定 Widevine Self Certification requirements 全部兑现 了. 测试结果的总结:测试结果的总结: 测试用例的测试的总的结果呈现在 'test summary' 部分. 它集中也列出了测试用例的 pass 数量,fail 数量,timeout 和 not be executed 数量 Test Package: google.features GTS checks following two properties. ● com.google.android.feature.GOOGLE_BUILD ● com.google.android.feature.GOOGLE_EXPERIENCE Devices should report them according to following rules. ● Partner devices should pass both. ● GPe devices should only fail testFeatureGoogleExperience. ● Nexus devices should fail both. Test Package: google.gmscore A precondition to pass these tests is to have GmsCore.apk preloaded as an system app, which is mandatory to a GMS build. RemoteSubmixTest KK(API level 19) introduces REMOTE_SUBMIX as follows. GTS 1.5 tests it by com.google.android.xts.gmscore.cast.RemoteSubmixTest#testRecordFromRemoteSubmix. All KK+ build is expected to pass these. ● REMOTE_SUBMIX VirtualDisplayTest VIRTUAL_DISPLAY_FLAG_PRESENTATION is added to DisplayManager in KK(API level 19) as follows. All KK+ device is expected to pass these. Test Package: google.home ● GTS takes screenshot and stores them in .../results//screenshots ● There should be 4 screenshots for ICS devices. Whereas, 5 screenshots for JB+ devices. Test Package: google.media MediaCodecCencTest is added for JB MR2(API Level 18)+ MedisCodecCencTest uses MediaCodec, MediaCrypto & MediaDrm API to test Wide DRM implementation for DASH(supported in 4.3) CENC. In general: 1. Android 4.3+ should support Dynamic Adaptive Streaming over HTTP (DASH the platform's concern, as android- 4.3.html. 2. A GMS build should support WV Modular DRM for CENC for all security leve 3. GTS tests DASH CENC by following criteria: ○ Only run MediaCodecCencTest on 4.3+(JB MR2, API level >=18) ○ Only run MediaCodecCencTest on L1 for HD contents ( videoHeight>= ○ Checks CodecProfileLevel for codec support, in general: i. CodecProfileLevel.AVCLevel31 & above should support 720p ii. CodecProfileLevel.AVCLevel4 & above should support 1080p MediaCodecStressTest added forJB MR2(API Level 18)+ MediaCodecStressTest tests that the device can create two decoders and one encoder for H.264/AVC at 1080p/720p resolution at the same time without crashing. Frames from the two decoders are composited by a fragment sh。
