ubuntu下Android4.4 CTS运行(三)

  • 运行CTS:
  1. Launch the CTS console by running the cts-tradefed script from the folder where the CTS package has been unzipped, e.g. $ ./android-cts/tools/cts-tradefed
  2. You may start the default test plan (containing all of the test packages) by appending: run cts –plan CTS This will kick off all the CTS tests required for compatibility. Enter list plans to see a list of test plans in the repository. Enter list packages to see a list of test packages in the repository. See the CTS command reference or type help for a complete list of supported commands.
  3. Alternately, you may run the CTS plan of your choosing from the command line using: cts-tradefed run cts –plan
  4. View test progress and results reported on the console.
  5. If your device is Android 5.0 or later and declares support for an ARM and a x86 ABI, you should run both the ARM and x86 CTS packages.
  • The following test plans are available:
  1. CTS—all tests required for compatibility.
  2. Signature—the signature verification of all public APIs
  3. Android—tests for the Android APIs
  4. Java—tests for the Java core library
  5. VM—tests for ART or Dalvik
  6. Performance—performance tests for your implementation
  • 中断后重新启动测试:
  1. l r 查看上次运行情况,获知 sessionID 号
  2. run cts –continue-session sessionID –disable-reboot继续运行上次的cts项 ,sessionID = 0, 1 ,2 。。。。。。
  • 对整体测试完成后,单独测试fail项的一种简单方法:

1) .整体测试完成,生成result report 等xml文件 ,通过l r 查看session ID号,2) .编辑result report 中的xml文件,把其中的fail项全部替换成not executed 项,3) .使用run cts –continue-session session_ID 重新执行之前的fail项,得到新的result report xml

  • cts fail项处理

每次测试完一个CTS ID后,都会产生一个目录,里面有测试log及测试result report 的xml文件.通过xml文件及log信息里面的错误信息,找到对应的cts 测试安排款源码,分析定位问题cts fail项 log 关键字查找TestRunner: started:TestRunner: finishedTestRunner: passedTestRunner: failed

  • 注意事项:
  1. Connect at least one device.
  2. Press the home button to set the device to the home screen at the start of CTS.
  3. While a device is running tests, it must not be used for any other tasks and must be kept in a stationary position (to avoid triggering sensor activity) with the cameras pointing at an object that could be focused.
  4. Do not press any keys on the device while the CTS is running. Pressing keys or touching the screen of a test device will interfere with the running tests and may lead to test failures.
  5. 如果设备不支持USB Debug等,只能通过网络方式,那么运行的时候,需要加上 —disable-reboot,例如run cts —plan CTS —disable-reboot

另外,Android设备端,运行setprop sys.usb.config adb

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值