GMS认证-Android8.x新增cts测试(VTS下测试GSI版本)

https://www.jianshu.com/p/3b1fbefc93ae

GMS认证-Android8.x新增cts测试(VTS下测试GSI版本)

96 
Darkt 
2018.01.25 12:36*  字数 460  阅读 641 评论 25

Android 8.0之后,由于平台架构的更改,GMS认证增加了新的测试项,包括VTS和针对GSI版本的CTS测试,本文主要介绍Android8.1针对GSI版本的CTS测试,VTS测试可参考Android VTS测试 。

测试环境配置

1、更换google的GSI
  • 设置中打开 OEM unlocking 选项
  • 设置中打开 USB debugging 选项
  • 长按音量 + 和电源键进入fastboot模式
  • 连接到电脑上,分别执行fastboot flashing unlockfastboot oem unlock
    执行命令后需要选择音量 + 来确认unlock。
  • 执行 fastboot 命令刷入google提供的 system.img (GSI):
    fastboot flash system system.img(需要根据软件版本的信息来选择GSI版本)
  • 重启: fastboot reboot
2、测试前准备
  • cts测试环境配置 : CTS测试配置

  • vts测试环境配置 :
    安装 Python 开发工具包:sudo apt-get install python-dev
    安装协议缓冲区工具(适用于 Python):sudo apt-get install python-protobuf protobuf-compiler
    安装 Python 虚拟环境相关工具:sudo apt-get install python-virtualenv python-pip

  • Media 媒体包:

    要求 CTS Media 1.4 及以上版本,在Android8.1的测试中,media文件要放在电脑中的/tmp/android-cts-media路径下,测试前不需要将Media文件拷贝到手机中,测试时会自动拷贝。如果/tmp/android-cts-media路径下没有media文件,将会从网上下载,由于文件比较大,比较耗时

运行针对GSI版本的CTS

  • 1、下载并解压vts测试工具包

  • 2、切换到android-vts的位置下:
    $ cd android-vts

  • 3、进入android-vts目录下,运行vts测试的控制台程序
    $ ./android-vts/tools/vts-tradefed

  • 4、运行 cts-on-gsi 测试
    > run cts-on-gsi​​

猜你喜欢

转载自blog.csdn.net/qq_37610155/article/details/79701331