最近一直在做Android兼容性测试,根据Android官网给出的android-cts-manual配置好了device后,开始测试。 首先配置软件环境: 1、下载Android-2.1系统,并编译。 $ . build/envsetup.sh //配置选项,并编译android源码
$ make cts //android源码编译好后,在编译cts

2、编译好cts后生成的文件位置如下 #mydroid/out/host/linux-x86/ 在该目录下包含如下测试文件
  • Package CTS: out/host/linux-x86/cts/android-cts.zip
  • cts make file: mydroid/build/core/tasks/cts.mk
  • run cts program: mydroid/out/host/linux-x86/bin/cts
  • test plans: mydroid/out/host/linux-x86/cts/android-cts/repository/plans
  • test packages: mydroid/out/host/linux-x86/cts/android-cts/repository/testcases
  • test results: mydroid/out/host/linux-x86/cts/android-cts/repository/results
  • CTS program settings value: mydroid/cts/tools/utils/host_config.xml
3、连接上Device后,进入如下目录 #mydroid/out/host/linux-x86/bin/ 并输入./cts来启动cts测试,效果如下: Android CTS version 2.1_pre_r2 device(0123456789ABCEDF) connected cts_host > 此时输入 help 将会列出cts所有的操作。 cts_host> ls --plan //list all test plan cts_host> ls -p //list all testcase cts_host>start --plan [plan name] //test plan ............. .............
4、进入目录 #mydroid/out/host/linux-x86/cts/android-cts/repository/plans 将会看到有8个测试的基类,它们分别是 Android.xml AppSecurity.xml CTS.xml Java.xml Performance.xml RefApp.xml Signature.xml VM.xml 用UltraEdit打开这些文件后,将会看到所有基类里包含的package 都给出了相应的uri, cts将根据这些uri去测试每个基类里的package,
5、cts_host > start --plan Android 输入上面的命令后,就开始测试 Android API, 其它的类测试命令和这个一致,如下: cts_host > start --plan Android //test Android API cts_host > start --plan CTS //contains all tests and will run ~21,000 tests on your device cts_host > start --plan Java //test Java core libary 。。。。。。。。。
6、测试好后,通过输入如下命令来查看测试情况 cts_host > ls -r 7、CTS测试会自动生成相应的测试包,该包位于如下目录: # mydroid/out/host/linux-x86/cts/android-cts/repository/results 每个测试包中包含了如下文件; cts_result.css cts_result.xsl logo.gif newrule-green.png testResult.xml 该包的测试情况都在 testResult.xml 文件中,通过查看该文件可以知道,那些是和 Android兼容的,,

8、未解决的问题 在测试中会遇到adb重启,adb重启后,断开Device连接,此时需要拔下usb再插上,才能再次测试, 如何解决这一情况有待研究,,
9、几个不错的参考网站 1、http://source.android.com/compatibility/index.html // Android compatibility 2、http://androidboss.com/android-cts-compatibility-test-suite-introduction-2/ // CTS how to add new testcase 3、 http://www.at91.com/android4sam/bin/view/Android4SAM/ // Atmel_android sam9m10 website
4、http://blog.csdn.net/zjujoe/archive/2010/06/01/5640461.aspx // good blog

更多相关文章

  1. 理解onMeasure
  2. 面试题5:椭圆里面有个内切圆,内切圆中有文字
  3. Android之十一实现登陆页面分析
  4. pandaboard ES学习之旅——5 Android(安卓)Linux内核源代码下载
  5. Android(安卓)编译系统理解:envsetup.sh学习
  6. LinearLayout水平居中控制
  7. android 背景圆角以及图片圆角处理
  8. android ubuntu下NDK的开发
  9. android内核字符驱动设备实战之----------设备驱动程序篇

随机推荐

  1. android configChanges
  2. Dialog
  3. Android的API版本和名称对应关系
  4. android Gallery(画廊)以及BaseAdapter
  5. Android(安卓)EditText 设置圆角
  6. Android(安卓)EditText 设置圆角
  7. 修改dialog背景以及代码扩展AlertDialog
  8. 电话接听并查看该人姓名
  9. 2011.06.23——— android 事件处理机制
  10. Android(安卓)5.0有哪些变化