Android CTS

RunningGuide

2011107

14:51

 

DUTPreparation

  1. Selecta good DUT(Device Under Test). Make sure the DUT pass the adb-rebootstress test (at least 800 times).

  1. Makesure power adapter is connected to the DUT.

  1. Checkif the Wifi/BT and Camera works on the DUT. Without them some casescan't pass.

  2. Ensure'adb' is in your system path.

Example:

exportPATH=$PATH:/home/myuser/android-sdk-linux_x86/platform-tools

DUTSetup

  1. Cleanthe data partition on DUT and then Reboot. (adb shell; cd /data/; rm-r *; sync)

  1. Settings->Developer options: enable the following items:

USBDebugging

Stayawake

Allowmock locations

  1. Settings->Security-> Unknown sources: disable it.

  1. AccessibilityDelegating: adb installandroid-cts/repository/testcases/CtsDelegatingAccessibilityService.apk

  1. Admin:adb install android-cts/repository/testcases/CtsDeviceAdmin.apk andactivate it via Settings -> Security -> Device administrators-> > Select device administrators

  1. Settings->Accessibility-> SERVICES-> Delegating Accessibility Service

  1. Settings->Date & time: set the correct date and time, aswell as the timezone.

  1. Settings->Language & input: Select English as the default.

  1. Wifi:connect an AP which has access to external website. Make sure thatAP isthe only ONE remembered AP.

  1. SDCard: make sure an SD card is plugged and with at least 200MB freespace.

  1. Goto HOME screen andNO touchduring the test.

  2. Makesure no lock pattern is set on the device (Settings > Security >Screen lock should be 'None').



HostPreparation

  1. Ubuntu10.04 or 11.04 on an x86 PC is needed for running CTS Host.

  1. InstallJava6 SDK:

$sudo add-apt-repository "deb http://archive.canonical.com/lucid partner"
$ sudo add-apt-repository "deb-src
http://archive.canonical.com/ubuntulucid partner"
$ sudo apt-get update
$ sudo apt-getinstall sun-java6-jdk

Pastedfrom <http://source.android.com/source/initializing.html>

  1. Unzipandroid-cts-3.2.1_r5-x86-arm.zip

  1. Makesure Host PC is also connected with power adapter and won'tgo to sleep mode.

  1. Rebootthe Host before starting cts. Itis also important to keep the Host environment clean.

  1. Removethe previous results in <android-cts>/repository/results/ andthe log files in <android-cts>/repository/. This may cause"Toomany open files"issue in CTS Host

  1. Edit/etc/security/limits.conf and add the following values at the bottomto avoid "Toomany open files issue":

*- nofile 51200

 

RunningCTS on Host

  1. $sudosu

  2. $<android-cts>/tools/cts-tradefed

  1. cts_host>runcts --plan CTS

 



Notes:running CTS under root account, so that it can avoid the adb nopermission issue.

 

Capturingthe log

  1. Bothhost and device logs locate at the dir:/android-cts/repository/logs/device_logcat_8750823928717142044.ziphost_log_63793616747035791.zip You can use the below command line tocapture the log.



$sudosu

$adbkill-server

$while [ 1 ]; do adb logcat -v threadtime | tee -a cts.log; done

 

Notes:running adb under root account, so that it can avoid the adb nopermission issue.



Checkthe result

  1. Theresult locates at<android-cts>/repository/results/2012.<Mon>.<Day>_<Hour>.<Min>.<Sec>/

  1. Theresult file will be updated when the CTS is running. You can checkit with firefox in the meantime. But don'tuse vim or other tool that will lock the file when opening it, as ifCTS can't update the result file, the result will be unexpected.

 

run cts --plan CTS                // full test
run cts -p android.accessibilityservice        // test plan
run cts -c android.accessibilityservice.cts.xxxxx                 // test class
run cts -c android.accessibilityservice.cts.xxxxx -m testview               //test   method


  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值