Camrea测试-- CTS测试

1、名词解释

       CTS,Compatibility Test Suite 兼容性测试。谷歌CTS测试

2、环境准备

   1.安装adb,配置环境变量

         网上下载adb,并放在usr/local/目录下

   2.将aapt放在和adb同级目录

         java 使用aapt工具解析apk信息必备工具

         sudo  apt-get install aapt

         配置aapt生效文档 sudo gedit /etc/profile,添加export PATH=$PATH:/usr/local/aapt。

         把代码/out下aapt放到/usr/local/下,sudo chmod +x aapt

    3.安装jdk1.9+,配置环境变量

          sudo apt install openjdk-9-jdk

    4.下载cts工具包,解压即可。

          安卓官网下载

    5、在手机设置中不锁屏,并保证测试环境中有日光灯

3、测试步骤

        1、手机连接电脑,adb devices 要显示出设备  

×××@ubuntu:/Code/×××$ adb devices
List of devices attached
????????????    no permissions

×××@ubuntu:/Code/×××$ adb kill-server
×××@ubuntu:/Code/×××$ sudo adb start-server
* daemon not running. starting it now on port 5037 *
* daemon started successfully *
×××@ubuntu:/Code/×××$ adb devices
List of devices attached
017×××ec0401    device

    2、进入测试环境

×××@ubuntu:~/android-cts/tools$ ./cts-tradefed
==================
Notice:
We collect anonymous usage statistics in accordance with our Content Licenses (https://source.android.com/setup/start/licenses), Contributor License Agreement (https://opensource.google.com/docs/cla/), Privacy Policy (https://policies.google.com/privacy) and Terms of Service (https://policies.google.com/terms).
==================
Android Compatibility Test Suite 11_r1 (6654162)
Use "help" or "help all" to get more information on running commands.
08-31 18:05:37 I/DeviceManager: Detected new device 017×××ec0401
cts-tf >

3、全测

   run cts -m CtsCameraTestCases

全测是在android-cts/testcases/CtsCameraTestCases。

4、继续测全测的失败项

run retry -s  [serial] --retey sessionId 重新运行之前任务中的失败用例,这个 sessionid 是执行 l r 显示出来的,第一列的数字。serial

    l r    //列出历史测试的结果

   

    cts-tf > l r
    Session Pass Fail Modules Complete   Result Directory           Test Plan         Device serial(s)               Build ID                      Product
                     0           0         0      0 of 3                   2020.08.18_14.00.30     cts                  [0123456789ABCDEF]       RP1A.200621.001       merlin
                     1            0         0      0 of 3                   2020.08.18_14.03.59      cts                   [0123456789ABCDEF]      RP1A.200621.001        merlin
                     2           0         0      0 of 3                   2020.08.18_14.09.20      cts                   [0123456789ABCDEF]       RP1A.200621.001        merlin
                     3          1307    400  0 of 3                   2020.08.18_14.15.00       cts                   [0123456789ABCDEF]      RP1A.200621.001          merlin
                     4         1033     674   0 of 3                  2020.08.20_14.06.50     cts                   [016×××610401]                 RP1A.200621.001          merlin

    run retry  --retry 4          //4是session

输入help,查看命令行,help + command==>查看具体的命令的介绍

4、view失败项

       CTS测试完之后会有result,具体的目录android-cts/results/2020.08.27_17.44.10/test_result.html

       这里面就会介绍CTS测试的具体失败问题,和错误的原因。这时候就要具体分析,解bug。大概分析出是平台问题或者排除了驱动的问题,就可以MTK或者高通官网上提case

5、恰饭

如果您觉得有用,感谢老铁请支持一波

猜你喜欢

转载自blog.csdn.net/weixin_38328785/article/details/108315849