CTS测试命令

这篇文章我列了一下常用的CTS命令:

1.查看帮忙信息

help

2.退出终端

exit:

3.进行plan为test_plan_name的测试,这个命令我们用的非常多

run cts –plan test_plan_name:

比如:

runcts –plan CTS

4.run cts –package/-p :这是一个包的测试: 

比如:

run cts --package/-p android.app

5.run cts –class/-c [–method/-m] :这是测试类或方法的测试命令,我们单独跑fail项时非常的有用

比如:

run cts –c android.app.cts.SystemFeaturesTestrun cts –c android.app.cts.SystemFeaturesTest -m testLiveWallpaperFeature

6.run cts –continue-session session_ID:这个命令是指在以前的一个测试报道上继续跑未跑的测试项,这个命令非常有用,特别是我们跑完第一次,有的测试项因为各种原因没有跑,那我们可以在这个测试报告上接着继续跑。

我们先使用l r查看现在的测试报道情况,再使用下面的命令跑sessin id为2的测试报告:

run cts --continue-session 2

run cts --retry session_id

NOT_EXECUTED

7.run cts [options] –serial/-s device_ID:run CTS on specified device,这个是如果我们电脑同进有连接多台手机测试时,我们指定手机的serial id来跑CTS

run cts –plan CTS –s 0123456789ABCDEF

8.run cts [options] –shards number_of_shards:

shard a CTS run into given number of independent chunks, to run on multiple devices inparallel

在几台手机上同时跑CTS,CTS会比较均衡的分配到多台机器上,这个命令非常有用,特别是现在进行一次CTS测试的时间要20多个小时,我们可以用多台手机来同时测试,减少测试时间。其本质是以机器数量换测试时间。

run cts –plan CTS –shards 5

9.run cts –help/–help-all:

get more help on running CTS

查看跑CTS更多的命令

10.l/list d/devices:list connected devices and their state

l d

11.查看当前设备以及他们的状态,显示他们的Serial,电量,等等信息

l/list packages:list CTS test packages

l packages

12.查看当前的CTS测试的包

l/list p/plans:list CTS test plans

l p:

13.查看CTS的plan信息,这个plan信息是在Android-cts/repository/plans目录下

l/list r/results:list CTS results currently present in the repository

l r

14.主要是查看当前CTS的测试结果

–[no-]all-devices:fork this command to run on all connected devices. Default: false.

使测试在所有连接的设备上同进进行测试

比如:

run cts –plan cts –all-devices

15.–[no-]skip-preconditions:Whether to skip precondition checks and automation Default: false.

这个命令有用,是直接跳过前期的检查工作,直接强制运行相关的测试。特别是android 6.0后,CTS测试如果不加这个,会进行前期的wifi,网络,视频,location等等的检查。

比如:

run cts –plan CTS –skip-preconditions

16.–[no-]skip-media-download:Whether to skip verifying/downloading media files Default: false.

是否忽略检查和下载视频

比如:

run cts –plan CTS –skip-media-download

17.-d, –[no-]skip-device-info:flag to control whether to collect info from device. Providing this flag will speed up test execution for short test runs but will result in required data being omitted from the test report. Default: false.

不收集设备信息,加快测试速度

例如:

run cts -c android.hardware.cts.SensorBatchingTests --skip-preconditions –d

18.–disable-reboot :Do not reboot device after running some amount of tests.

不要重启机器,直接测试

例如:

run cts -c android.hardware.cts.SensorBatchingTests --skip-preconditions –d –disable-reboot

19.–force-abi 32|64:On 64-bit devices, run the test against only the 32-bit or 64-bit ABI

这个命令非常有用,特别是对于64bit的手机,如果我们只跑run cts –plan CTS,会跑二次(32bit的abi和64bit的abi),严重浪费时间。

run cts --plan CTS --force-abi64

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容

  • Android 自定义View的各种姿势1 Activity的显示之ViewRootImpl详解 Activity...
    passiontim阅读 175,995评论 25 709
  • Spring Cloud为开发人员提供了快速构建分布式系统中一些常见模式的工具(例如配置管理,服务发现,断路器,智...
    卡卡罗2017阅读 135,850评论 19 139
  • - 后来发现凉白开喝下去更干净 半夜写出的文字也挺有味道 清晨那碗粥暖胃舒服 痛极后孤立无援的想法更成熟 一路走一...
    久腻zy阅读 1,666评论 1 3
  • 校园抓鬼记(中)校园抓鬼记(下) 我要讲的这件事,是关于我的大学室友的。 他如今已在洛阳的白马寺出家修行,法号无执...
    暝色入高楼阅读 5,266评论 13 2
  • 有些道理,你听了很多遍,不经历,你永远不会明白它的道理是什么。就像这句话,你能想象,我现在对这句的话的理解程度已经...
    Feiya_阅读 1,612评论 0 0

友情链接更多精彩内容