CTS(3)---CTS 测试的一点心得
CTS 测试的一点心得
CTS介绍-----------------------------------------------3
什么是CTS------------------------------------------3
测试环境搭建-------------------------------------------3
测试环境--------------------------------------------3
测试前准备------------------------------------------3
测试手机配置----------------------------------------4
执行测试------------------------------------------------4
整体测试6.0以下------------------------------------4
测试相关的指令--------------------------------------5
主要针对6.0及其以下版本测试使用------------------7
针对Android7.0以及以后版本测试------------------8
测试结果输出------------------------------------------10
FAQ---------------------------------------------------10
什么是CTS
Android6.0的测试包和Android7.0的CTS测试包已经有些不同,而Media Files最新为CTS Media 1.2.,
测试环境搭建
测试环境
· 需正确配置JavaJDK(1.7版本以上)和Android SDK 和ADB,确保系统和手机能够正常的连接
测试前准备
· 插入可用的Sim卡,如果为双卡版本,需确保卡一的卡槽有可用的Sim卡.
测试手机配置
· 手机恢复出厂设置(Settings→Backup andreset→Factory data reset)
· 确保SD中有足够的空间(大于1G),可将SD格式化清空。
· 确保日期和时间的正确(开了Wifi或者数据连接以后会自动更新时间,时区选默认的),设置太平洋时间gtm:-8
· 设置屏幕为常亮(Settings→Display→Sleep→Never)
· 设置无锁屏(Settings→Security→Set up screenlock→None)
· 手机恢复出厂设置(Settings→Backup andreset→Factory data reset)
· 确保开发者选项中的USB debugging,Stay awake,Allowmock locations三个选项已勾选。
· 设置系统语言为美式英语(Settings→Language&input→Language)
· 设置系统输入法为谷歌默认输入法
(Settings→Language&input→Default→English(US))
执行测试
整体测试
测试相关的指令
xxx@CTS-ceshi:~/cts/6.0_r14/android-cts$cd tools/
xxx@CTS-ceshi:~/cts/6.0_r14/android-cts/tools$./cts-tradefed
Android CTS 6.0_r14 build:3623550
03-17 16:46:58 I/DeviceManager: Detectednew device c23392e
l cts-tf > runcts --plan CTS --disable-reboot //开始执CTS整个测试包
runcts --plan test_plan_name: run a test plan
runcts --package/-p : run a CTS test package
runcts --class/-c [--method/-m] : run a specific test class and/ormethod
run cts --continue-session session_ID: run allnot executed tests from a previous CTS session
runcts [options] --serial/-s device_ID: run CTS on specified device
runcts --help/--help-all: get more help on running CTS
l/list d/devices: list connected devices and their state
l/list packages: list CTS test packages
l/list p/plans: list CTS test plans
l/list i/invocations: list invocations aka CTStest runs currentlyin progress
l/list r/results: list CTS results currently present in the repository
d/dump l/logs: dump the tradefed logs for all running invocations
--disable-reboot: Do not reboot device after running some amount of tests.
l cts-tf > l r 查看失败项目 成功项目 ,未执行项目
Session Pass Fail Not Executed Start time Plan name Device serial(s)
0 2743 130 3555 2017.01.18_16.46.14 CTS1 24ade972
l cts-tf> run cts --continue-session 0 --disable-reboot
Session Pass Fail Not Executed Start time Plan name Device serial(s)
0 2743 130 3555 2017.01.18_16.46.14 CTS1 24ade972
l cts-tf> add derivedplan --plan testname -s 0 -r fail
l cts-tf> run cts --plan testname 执行失败项目
l i 命令查看运行时间 cts-tf > l i
l r 查看测试结果 cts-tf > l r
主要针对6.0及其以下版本测试使用
CTS v1 console command reference
Table1. This table summarizes the CTS v1 console commands for varioususes.
Host |
Description |
help |
Display a summary of the most commonly used commands |
help all |
Display the complete list of available commands |
exit |
Gracefully exit the CTS console. Console will close when all currently running tests are finished |
Run |
Description |
run cts |
Run the specified tests and displays progress information. One of --plan, --package, --class or --continue-session needs to be specified The CTS console can accept other commands while tests are in progress If no devices are connected, the CTS desktop machine (or host) will wait for a device to be connected before starting tests If more than one device is connected, the CTS host will choose a device automatically |
--plan <test_plan_name> |
Run the specified test plan |
--package/-p <test_package_name> [--package/-p <test_package2>...] |
Run the specified test packages |
--class/-c <class_name> [--method/-m <test_method_name> |
Run the specified test class and/or method |
--continue-session |
Run all not executed tests from previous CTS session; the sessions testResult.xml will be updated with the new results |
--shards <number_of_shards> |
Shard a CTS run into given number of independent chunks, to run on multiple devices in parallel |
--serial/-s <deviceID> |
Run CTS on the specific device |
-t <class_name>#<test_method_name> |
Run a specific test method |
--force-abi 32|64 |
On 64-bit devices, run the test against only the 32-bit or 64-bit ABI |
List |
Description |
list packages |
List all available test packages in the repository |
list plans |
List all available test plans in the repository |
list invocations |
List 'run' commands currently being executed on devices |
list commands |
List all 'run' commands currently in the queue waiting to be assigned to devices |
list results |
List CTS results currently stored in repository |
list devices |
List currently connected devices and their state 'Available' devices are functioning, idle devices, available for running tests 'Unavailable' devices are devices visible via adb, but are not responding to adb commands and won't be allocated for tests 'Allocated' devices are devices currently running tests |
Add |
Description |
add derivedplan --plan <plan_name> |
Create a plan derived from given result session; use this option to rerun reports and validate test issues |
针对Android7.0 以及以后版本测试
For Android 7.0 or later, you'll use CTS v2.
CTS v2 console command reference
Table1. This table summarizes the CTS V2 console commands for varioususes.
Host |
Description |
help |
Display a summary of the most commonly used commands |
help all |
Display the complete list of available commands |
version |
Show the version. |
exit |
Gracefully exit the CTS console. Console will close when all currently running tests are finished. |
Run |
Description |
run cts |
Run the default CTS plan (that is, the full CTS invocation). The CTS console can accept other commands while tests are in progress. If no devices are connected, the CTS desktop machine (or host) will wait for a device to be connected before starting tests. If more than one device is connected, the CTS host will choose a device automatically. |
--plan <test_plan_name> |
Run the specified test plan. |
--module/-m <test_module_name> [--module/-m <test_module2>...] |
Run the specified test module or modules. For example, run cts --module CtsGestureTestCases executes the gesture test module (this can be shortened to run cts -m Gesture). |
--module/-m <test_module_name> -- test <test_name> |
Run the specified module and test. For example, run cts -m Gesture --test android.gesture.cts. GestureTest#testGetStrokes runs the specific package, class, or test. |
--retry |
Retry all tests that failed or were not executed from the previous sessions. Use list results to get the session id. |
--shards <number_of_shards> |
Shard a CTS run into given number of independent chunks, to run on multiple devices in parallel. |
--serial/-s <deviceID> |
Run CTS on the specific device. |
--include-filter <module_name> [--include-filter <module2>...] |
Run only with the specified modules. |
--exclude-filter <module_name> [--exclude-filter <module2>...] |
Exclude the specified modules from the run. |
--log-level-display/-l <log_level> |
Run with the minimum specified log level displayed to STDOUT. Valid values: [VERBOSE, DEBUG, INFO, WARN, ERROR, ASSERT]. |
--abi <abi_name> |
Force the test to run on the given ABI, 32 or 64. By default CTS runs a test once for each ABI the device supports. |
--logcat, --bugreport, and --screenshoot-on-failure |
Give more visibility into failures and can help with diagnostics. |
--device-token |
Specifies a given device has the given token eg. --device-token 1a2b3c4d:sim-card.. |
--skip-device-info |
Skips collection of information about the device. Note: do not use this option when running CTS for approval. |
--skip-preconditions |
Bypasses verification and setup of the device's configuration, such as pushing media files or checking for Wi-Fi connection. |
List |
Description |
list modules |
List all available test modules in the repository. |
list plansor list configs |
List all available test plans (configs) in the repository. |
list invocations |
List 'run' commands currently being executed on devices. |
list commands |
List all 'run' commands currently in the queue waiting to be assigned to devices. |
list results |
List CTS results currently stored in repository. |
list devices |
List currently connected devices and their state. 'Available' devices are functioning, idle devices, available for running tests. 'Unavailable' devices are devices visible via adb, but are not responding to adb commands and won't be allocated for tests. 'Allocated' devices are devices currently running tests. |
Dump |
Description |
dump logs |
Dump the tradefed logs for all running invocations. |
ADD |
Description ps: |
a/add s/subplan |
Create a subplan used to create a subplan |
--session <session_id> |
The session used to create a subplan |
--result-type <status> |
Which result to include in the subplan |
--name/-n <subplan_name> |
The name of the new subplan |
Cts-tf> run cts --retry sessionId --retry-type FAILED/NOT_EXECUTED 执行未完成的任务 ,输出结果 |
测试结果输出
l 测试结束后 /repository/results/2016.05.27_21.29.17/testResult.xml使用浏览器打开,查看测试的结果
最近因为测试 的需要,接触到了Android cts测试 ,以上是最近整理的一点东西 ,如果有不对的地方,也请看到的大神指点一二,谢谢 !
FAQ
增加了环境变量 ,使用的是6.0的aapt ,这是要测试的相应的版本的aapt
1 。root@CTS-ceshi:~# gedit .bashrc
exportANDROID_HOME=/home/liangcheng/android-sdk-linux #/*SDK所在的路径*/
exportPATH=$PATH:/home/liangcheng/android-sdk-linux/build-tools/23.0.3
CTS(3)---CTS 测试的一点心得相关推荐
- CTS、CTS Verify、GTS测试以及GMS认证
目录 一.一些概念 二.GMS认证 2.1 认证背景 2.2 GMS认证目的 2.3 GMS认证要求 2.4 GMS认证流程 2.5 MADA协议申请流程 三.CTS测试 3.1 CTS测试介绍 3. ...
- CTS、CTS Verify、GTS测试以及GMS认证介绍
一.一些概念 ① CTS测试 以自动化测试为基础,测试Android系统的兼容性: ② CTS Verify 一个手工测试的apk,完成自动化测试无法完成的操作(锁屏.蓝牙.摄像头等): ③ GTS ...
- 新手网站推广邮件群发一点心得
关于邮件群发一点心得 请勿见笑,本人新人啊.新人做法还是比较菜的.说一下邮件群发吧.最近本人下软件不下百次.病毒木马电脑已经是满满一箩筐了,幸好是虚拟机里. 首先收集相关邮件地址这里转一篇文章 营销如 ...
- 谈谈选用技术的原则,技术学习方法技巧,阅读代码的技巧及其它 MSF的一点心得...
谈谈技术原则,技术学习方法,代码阅读及其它(正文) 这篇文章是前一阵在水木BBS上和别人讨论中偶自己发言的摘编,是偶这几年开发过程完全经验式的总结.完全个人经验,供批判. 一.选用技术的原则 比较规范 ...
- mysql数据库管理系统模式_MYSQL命令行模式管理MySql的一点心得
MYSQL命令行模式管理MySql的一点心得 MYSQL命令行模式管理MySql的一点心得 MySql数据库是中小型网站后台数据库的首选,因为它对非商业应用是免费的.网站开发者可以搭建一个" ...
- CTS(13)---CTS 测试之Media相关测试failed 小结(一)
Android o CTS 测试之Media相关测试failed 小结(一) CTS CTS 即兼容性测试套件,CTS 在桌面设备上运行,并直接在连接的设备或模拟器上执行测试用例.CTS 是一套单元测 ...
- CTS ( 9)---CTS 源码分析
CTS 源码分析(一)--CTS概况 CTS 源码分析(一) --CTS概况 1.什么是CTS? Compatibility Test Suite 兼容性测试套件 说白了,就是一套工具.一套软件组成 ...
- java学不下去能学web安全吗,这半年学习 Web 安全的一点心得体会
原标题:这半年学习 Web 安全的一点心得体会 来自公众号: 信安之路 大家好,我是 Mirror(王宇阳),专科在读的大二学生:接触信安时间不长,大佬多多指教.信安之路成长平台网站开放后我就在双十一 ...
- C++关于利用_kbhit()函数持续获取键盘输入的一点心得。
#C++关于利用_kbhit()函数持续获取键盘输入的一点心得. 小白路过想写个贪吃蛇玩玩,当用链表把贪吃蛇结构连起来后自然就想到了移动控制的问题.写来写去代码总是出错,贪吃蛇只有一直按着方向键才能移 ...
最新文章
- oracle修改表结构的sql命令是什么,sql语句中修改表结构的命令是什么?
- dos进入/退出某文件夹
- 校园招聘最重要的有2点 第一个是不要抱死一家公司
- 案例二:动态页面模拟点击
- Spring Boot 学习系列(08)—自定义servlet、filter及listener
- 我终于知道,中国互联网是怎么弯道超车,干翻美国了
- 万由nas系统安装MySQL_ESXi安装万由OS(U-NAS 3.0.9)
- ‘javah‘ 不是内部或外部命令,也不是可运行的程序 或批处理文件
- 第22次 CCF CSP认证一二题题解及感悟
- 3d17340期计算机开机号,便民工作室提供--中国福彩中-心开机号114开机号
- 必学技术java Swing之随心所欲添加自定义位置和大小的组件(建议收藏)
- html4和html5的区别
- 对过去五年工作经历的总结
- android activity获取dialog对象,Android开发笔记之:Dialog的使用详解
- Pycharm全局搜索关键字
- PC休闲游戏~植物大战僵尸-植物连连看v1.0正式发布啦(更新iPhone版本)!
- SAP发送邮件作为附件
- MySQL 优化器原来是这样工作的
- 联发科 IC校招笔试题目
- excel成本统计:如何进行区域筛选,多条件求和?