Android(安卓)CTS 测试总结
16lz
2021-12-04
转自 http://chenhuawei1234567.blog.163.com/blog/static/194526712010629111638224/
最近一直在做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
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
更多相关文章
- android基础---->Parcelable的使用
- WebView在Fragment中点击返回键返回上一页
- android全屏去掉title栏的多种实现方法
- Android(安卓)AOSP源码下载编译
- [原]Ubuntu 14.04编译Android(安卓)Kernel
- android 开发问题集,android问题总结,android错误解决收集
- 通过AndroidTestCase来进行android 单元测试
- Android(安卓)Studio 开发依赖库集锦
- FFmpeg的Android平台移植—编译篇