Android CTS
来源:互联网 发布:软件开发报价表 编辑:程序博客网 时间:2024/05/13 01:04
RunningGuide
2011年10月7日
14:51
DUTPreparation
Selecta good DUT(Device Under Test). Make sure the DUT pass the adb-rebootstress test (at least 800 times).
Makesure power adapter is connected to the DUT.
Checkif the Wifi/BT and Camera works on the DUT. Without them some casescan't pass.
Ensure'adb' is in your system path.
Example:
exportPATH=$PATH:/home/myuser/android-sdk-linux_x86/platform-tools
DUTSetup
Cleanthe data partition on DUT and then Reboot. (adb shell; cd /data/; rm-r *; sync)
Settings->Developer options: enable the following items:
USBDebugging
Stayawake
Allowmock locations
Settings->Security-> Unknown sources: disable it.
AccessibilityDelegating: adb installandroid-cts/repository/testcases/CtsDelegatingAccessibilityService.apk
Admin:adb install android-cts/repository/testcases/CtsDeviceAdmin.apk andactivate it via Settings -> Security -> Device administrators-> > Select device administrators
Settings->Accessibility-> SERVICES-> Delegating Accessibility Service
Settings->Date & time: set the correct date and time,aswell as the timezone.
Settings->Language & input: Select English as the default.
Wifi:connect an AP which has access to external website. Make sure thatAP isthe only ONE remembered AP.
SDCard: make sure an SD card is plugged and with at least 200MB freespace.
Goto HOME screen andNO touchduring the test.
Makesure no lock pattern is set on the device (Settings > Security >Screen lock should be 'None').
HostPreparation
Ubuntu10.04 or 11.04 on an x86 PC is needed for running CTS Host.
InstallJava6 SDK:
$sudo add-apt-repository "debhttp://archive.canonical.com/lucid partner"
$ sudo add-apt-repository "deb-srchttp://archive.canonical.com/ubuntulucid partner"
$ sudo apt-get update
$ sudo apt-getinstall sun-java6-jdk
Pastedfrom <http://source.android.com/source/initializing.html>
Unzipandroid-cts-3.2.1_r5-x86-arm.zip
Makesure Host PC is also connected with power adapter andwon'tgo to sleep mode.
Rebootthe Host before starting cts.Itis also important to keep the Host environment clean.
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
Edit/etc/security/limits.conf and add the following values at the bottomto avoid "Toomany open files issue":
*- nofile 51200
RunningCTS on Host
$sudosu
$<android-cts>/tools/cts-tradefed
cts_host>runcts --plan CTS
Notes:running CTS under root account, so that it can avoid the adb nopermission issue.
Capturingthe log
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
Theresult locates at<android-cts>/repository/results/2012.<Mon>.<Day>_<Hour>.<Min>.<Sec>/
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
- Android CTS
- Android CTS
- Android CTS
- Android CTS
- android CTS
- Android CTS
- CTS Fail: android.hardware.cts.CameraTest-- testJpegExif
- cts android.bluetooth.cts.BluetoothLeScanTest --testBasicBleScan fail
- cts fail:com.android.cts.aadb.TestDeviceFuncTest
- Android CTS 测试研究
- android 之 CTS
- Android CTS 总结
- Android CTS 总结
- Android的CTS测试
- Android CTS 总结
- Android的CTS测试
- android CTS调试
- Android CTS 测试 过程
- lds 链接脚本
- MFC界面gif图片
- iphone拨号api调用后返回自己的应用
- hdu2164
- 为程序添加系统上下文菜单
- Android CTS
- hdu2553
- VIEW切换时的翻页效果
- hdu2181
- 利用Python写一个斐波那契序列
- Parser Generator 配置方法
- hdu1811
- C关键字解读——void, return, const
- java使用现有的类库的排序方法