android TV CTS 4.0.3_r1测试

老虎说测试 2013 年 07 月 11 日09:24:11大话测试字数 2325阅读7分45秒阅读模式
摘要

android TV CTS 4.0.3_r1测试

.Download CTS文章源自陈学虎-https://chenxuehu.com/article/2013/07/1275.html

文章源自陈学虎-https://chenxuehu.com/article/2013/07/1275.html

1.1打开浏览器输入连接: http://source.android.com/compatibility/downloads.html 文章源自陈学虎-https://chenxuehu.com/article/2013/07/1275.html

1.2选择对应Android版本的CDD文档(介绍CTS测试),CTS测试包下载(测试包会不断更新),android-cts-verifier-4.0.3_r1-linux_x86-arm.zip,android-cts-media-1.0.zip 文章源自陈学虎-https://chenxuehu.com/article/2013/07/1275.html

1.3将下载的CTS测试包解压到相应文件夹里面应包含:android-cts文件夹里面包含Docs、Repository、Tools三个文件夹。 文章源自陈学虎-https://chenxuehu.com/article/2013/07/1275.html

1.4 下载android SDK(仅需要ADB工具)文章源自陈学虎-https://chenxuehu.com/article/2013/07/1275.html

文章源自陈学虎-https://chenxuehu.com/article/2013/07/1275.html

.调整系统状态文章源自陈学虎-https://chenxuehu.com/article/2013/07/1275.html

文章源自陈学虎-https://chenxuehu.com/article/2013/07/1275.html

2.1使用user mode的image将TV版本烧成user模式 文章源自陈学虎-https://chenxuehu.com/article/2013/07/1275.html

2.2 执行系统重置,恢复为出厂状态 文章源自陈学虎-https://chenxuehu.com/article/2013/07/1275.html

2.3 进入Factory mode,将ADB连接状态设为TCP/IP打开端口5555 文章源自陈学虎-https://chenxuehu.com/article/2013/07/1275.html

2.4测试前需要安装apk:adb install android-cts/repository/testcases/CtsDelegatingAccessibilityService.apk 文章源自陈学虎-https://chenxuehu.com/article/2013/07/1275.html

然后在设置里面的辅助功能中会多一个Delegating Accessibility Service选项,将这个选项打开。文章源自陈学虎-https://chenxuehu.com/article/2013/07/1275.html

2.5 测试前需要安装apk:adb install android-cts/repository/testcases/CtsDeviceadmin.apk文章源自陈学虎-https://chenxuehu.com/article/2013/07/1275.html

2.6 测试前需要安装apk:adb install CtsVerifier.apk文章源自陈学虎-https://chenxuehu.com/article/2013/07/1275.html

在设置安全->选择设备管理器对多出三个选项,将这三个选项勾选上并激活文章源自陈学虎-https://chenxuehu.com/article/2013/07/1275.html

2.7将SD卡清空。在SD卡中新建目录test, 将android-cts-media-1.0.zip解压到test目录中,将SD卡插入TV中。确定SD卡为可读可写状态。文章源自陈学虎-https://chenxuehu.com/article/2013/07/1275.html

2.8在 android设备设置中:安全->屏幕安全保护->自动锁定设为None文章源自陈学虎-https://chenxuehu.com/article/2013/07/1275.html

2.9在 android设备设置中:开发人员选项->保持唤醒状态,允许模拟地址两项勾选文章源自陈学虎-https://chenxuehu.com/article/2013/07/1275.html

2.10将 android设备的语言设置为英文。文章源自陈学虎-https://chenxuehu.com/article/2013/07/1275.html

2.11将WIFI打开,连接一个可用AP文章源自陈学虎-https://chenxuehu.com/article/2013/07/1275.html

2.12 将ethernet打开并连接上(若硬件支持USB ADB debug则可忽略此项)文章源自陈学虎-https://chenxuehu.com/article/2013/07/1275.html

2.13设置->输入语言设为android文章源自陈学虎-https://chenxuehu.com/article/2013/07/1275.html

2.14 因我们伟大的党的金盾工程,我们无法连接上google server,而有些case必须要通过连接到google server才可以测试。可以有很多种方法翻墙出去,下面介绍的是使用VPN翻墙法文章源自陈学虎-https://chenxuehu.com/article/2013/07/1275.html

设置->网络设置->更多文章源自陈学虎-https://chenxuehu.com/article/2013/07/1275.html

选择VPN文章源自陈学虎-https://chenxuehu.com/article/2013/07/1275.html

a. Set PW文章源自陈学虎-https://chenxuehu.com/article/2013/07/1275.html

b. Add VPN文章源自陈学虎-https://chenxuehu.com/article/2013/07/1275.html

c. 类型:PPTP文章源自陈学虎-https://chenxuehu.com/article/2013/07/1275.html

d. PPP加密disable文章源自陈学虎-https://chenxuehu.com/article/2013/07/1275.html

e. 点确定添加成功文章源自陈学虎-https://chenxuehu.com/article/2013/07/1275.html

f. 选择添加好的VPN,输入用户名和密码,连接成功。(连接VPN前先确定网络连接是否正常,VPN依赖于internet连接)文章源自陈学虎-https://chenxuehu.com/article/2013/07/1275.html

2.15 将TV设到Home screen文章源自陈学虎-https://chenxuehu.com/article/2013/07/1275.html

文章源自陈学虎-https://chenxuehu.com/article/2013/07/1275.html

.RUN CTS文章源自陈学虎-https://chenxuehu.com/article/2013/07/1275.html

3.1 先确定linux 系统的adb path是否设置正确(详见附录)文章源自陈学虎-https://chenxuehu.com/article/2013/07/1275.html

3.2 打开终端,进入android-cts/tools目录文章源自陈学虎-https://chenxuehu.com/article/2013/07/1275.html

执行命令:文章源自陈学虎-https://chenxuehu.com/article/2013/07/1275.html

cd android/tools文章源自陈学虎-https://chenxuehu.com/article/2013/07/1275.html

adb connect <TV的ethernet IP>(如果使用ADB USB debug则忽略此项)文章源自陈学虎-https://chenxuehu.com/article/2013/07/1275.html

3.3进入CTS,执行cts-tradefed脚本文章源自陈学虎-https://chenxuehu.com/article/2013/07/1275.html

执行命令:./ cts-tradefed文章源自陈学虎-https://chenxuehu.com/article/2013/07/1275.html

注:有时候进入CTS测试状态后无法出现cts-tf >,此时电脑按一个回车键就可以了。这是CTS的一个小bug文章源自陈学虎-https://chenxuehu.com/article/2013/07/1275.html

3.4开始整个CTS测试文章源自陈学虎-https://chenxuehu.com/article/2013/07/1275.html

执行一个plan:run cts --plan <plan名称>文章源自陈学虎-https://chenxuehu.com/article/2013/07/1275.html

仅测试一个包:run cts –p <测试包名称>文章源自陈学虎-https://chenxuehu.com/article/2013/07/1275.html

多台TV同时测试:run cts –s 设备名称 –-plan <plan名称>文章源自陈学虎-https://chenxuehu.com/article/2013/07/1275.html

其他测试命令请参阅附录文章源自陈学虎-https://chenxuehu.com/article/2013/07/1275.html

3.5测试结果文章源自陈学虎-https://chenxuehu.com/article/2013/07/1275.html

测试结果在android-cts/repository/results目录下文章源自陈学虎-https://chenxuehu.com/article/2013/07/1275.html

注意事项:CTS测试中不能对TV做任何操作,故测试时请将摇控器移走。文章源自陈学虎-https://chenxuehu.com/article/2013/07/1275.html

文章源自陈学虎-https://chenxuehu.com/article/2013/07/1275.html

附录:文章源自陈学虎-https://chenxuehu.com/article/2013/07/1275.html

1.  如何设置adb path文章源自陈学虎-https://chenxuehu.com/article/2013/07/1275.html

Shell 命令:文章源自陈学虎-https://chenxuehu.com/article/2013/07/1275.html

root@test-ThinkCentre-XXXX:~# cd ~文章源自陈学虎-https://chenxuehu.com/article/2013/07/1275.html

root@test-ThinkCentre-XXXX:~# vim .profile文章源自陈学虎-https://chenxuehu.com/article/2013/07/1275.html

在profile文件中添加文章源自陈学虎-https://chenxuehu.com/article/2013/07/1275.html

if [ "$BASH" ]; then文章源自陈学虎-https://chenxuehu.com/article/2013/07/1275.html

 if [ -f ~/.bashrc ]; then文章源自陈学虎-https://chenxuehu.com/article/2013/07/1275.html

   . ~/.bashrc文章源自陈学虎-https://chenxuehu.com/article/2013/07/1275.html

 fi文章源自陈学虎-https://chenxuehu.com/article/2013/07/1275.html

fi文章源自陈学虎-https://chenxuehu.com/article/2013/07/1275.html

文章源自陈学虎-https://chenxuehu.com/article/2013/07/1275.html

mesg n文章源自陈学虎-https://chenxuehu.com/article/2013/07/1275.html

PATH=$PATH:/home/test/tool/UpdateSmartBoardImageSOP:文章源自陈学虎-https://chenxuehu.com/article/2013/07/1275.html

文章源自陈学虎-https://chenxuehu.com/article/2013/07/1275.html

有些linux PC系统是需要定义bash文件来达到设置路径文章源自陈学虎-https://chenxuehu.com/article/2013/07/1275.html

> vim /etc/bash.bashrc文章源自陈学虎-https://chenxuehu.com/article/2013/07/1275.html

在文件的最后加上下面的设置文章源自陈学虎-https://chenxuehu.com/article/2013/07/1275.html

export PATH=$PATH:/home/test/tool/UpdateSmartBoardImageSOP:文章源自陈学虎-https://chenxuehu.com/article/2013/07/1275.html

Path地址为ADB tool的存放绝对路径。文章源自陈学虎-https://chenxuehu.com/article/2013/07/1275.html

设置完path重起系统文章源自陈学虎-https://chenxuehu.com/article/2013/07/1275.html

文章源自陈学虎-https://chenxuehu.com/article/2013/07/1275.html

2. CTS命令集文章源自陈学虎-https://chenxuehu.com/article/2013/07/1275.html

2.1    如何看seesion ID
cts-tf>l r文章源自陈学虎-https://chenxuehu.com/article/2013/07/1275.html

CTS会列出seesion ID号和对应的测试result文件夹名文章源自陈学虎-https://chenxuehu.com/article/2013/07/1275.html

2.2    Continue test文章源自陈学虎-https://chenxuehu.com/article/2013/07/1275.html

如果测试过程中系统死机重起了,可以中断CTS测试,通过以下的命令继续刚才的测试文章源自陈学虎-https://chenxuehu.com/article/2013/07/1275.html

 run cts –-continue-session <seesion ID>文章源自陈学虎-https://chenxuehu.com/article/2013/07/1275.html

2.3 测试pass/fail/notExecuted/timeout case文章源自陈学虎-https://chenxuehu.com/article/2013/07/1275.html

Add derivedplan –plan <新建的plan名称> --session session-ID –r [pass/fail/notExecuted/timeout]文章源自陈学虎-https://chenxuehu.com/article/2013/07/1275.html

run cts –plan <刚才新建的plan>文章源自陈学虎-https://chenxuehu.com/article/2013/07/1275.html

  • 版权声明:本文为原创文章,转载请附上原文出处链接及本声明。
  • 转载请注明:android TV CTS 4.0.3_r1测试 | https://chenxuehu.com/article/2013/07/1275.html