Android CTS 测试总结【转】

最近一直在做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

时间: 2024-08-25 17:27:45

Android CTS 测试总结【转】的相关文章

Android CTS測试Fail项改动总结(四)

Android5.1上的測试 1.android.security.cts.SELinuxDomainTest# testInitDomain fail 打印的log junit.framework.AssertionFailedError: Expected 1 process in SELinux domain "u:r:init:s0" Found "[ pid: "1" proctitle: "/init" label: &qu

Android CTS Test

什么是CTS测试?了解这个问题前,我们先来搜索了解一遍"Google GMS 认证".GMS全称为GoogleMobile Service,即谷歌移动服务.说白了GMS其实就是一系列谷歌的应用集合.谷歌GMS认证(Google Mobile Services Test Certification )是谷歌公司为了确保全世界的硬件厂商设计和生产安卓为基础的各种智能硬件产品的兼容性.稳定性,以及这些硬件与安卓各种自带的各种软件APP产品和服务的兼容性.稳定性方面的测试和认证. Google

监听Android CTS测试项解决方案(二)

二,监听当前测试项是否是Accelerometer Measurement Test测试项 通过第一种方式介绍的,我们可以得到当前处于活动状态的Activity类似监听CTS测试当前的测试项.但是由于是监听Android系统中所有Activity,因此会大大降低系统的性能,因此这里有一种效率更高的方式来精确定位当前CTS正在测试的测试项,而不会对系统造成很大的影响.(当然不能修改CTS源码,我们需要使用Android提供的原生CTS APK进行验证) 那么我们这里以Accelerometer M

监听Android CTS测试项解决方案(一)

前言: 首先这里需要详细叙述一下标题中"监听Android CTS测试项解决方案"的需求.这里的需求是指我们需要精确的监听到当前CTS测试正在测试的测试项. 因为我们知道CTS认证是获得Google推出的 Android 系统中 Android Market 服务的前提.CTS 兼容性测试的主要目的和意义在于使得用户在 Android 系统的应用过程中,有更好的用户体验,并展现出 Android 系统的优越特性:使得 Android 应用程序编写者更容易编写高质量的应用程序:充分展现

Android CTS

1.什么是CTS CTS是google制定的兼容性测试包(Compatibility Test Suite),只有通过CTS测试的设备才有可能获得Android的商标和享受Android Market的权限.其目的是用来规范Android设备开发商防止厂商对Android的改动影响其SDK API的兼容性,确保设备运行的Android系统全面兼容Android规范,即第三方应用程序安装到该厂商的机器上都能正常运行,给用户带来更好的体验.Google还提供了一份兼容性标准文档(Compatibil

求助,Help!!!关于android CTS TV测试的fail问题。。。

============问题描述============ android测试里的测试项基本上都是针对android手机写的,但是我现在做的是android 4.0.3电视的cts测试,测试用例里面很多针对电话.短信.GPS.camera等fail项,这该怎么解决呢???没有没办法让测试时遇到这些电视没有的功能时跳过不测这些case呢??? ============解决方案1============ 把你希望测试的项 添加到 out/host/linux-x86/cts/android-cts/r

Android CTS(兼容性测试)整个流程

为了保证开发的应用在所有兼容Android的设备上正常运行,并保证一致的用户体验,Google制定了CTS(Compatibility Test Suite)来确保设备运行的Android系统全面兼容Android规范,Google也提供了一份兼容性标准文档(Compatibility Definition Document, CDD). 在进行CTS之前,需要先从google官网下载相关文件,需要自卑梯子翻墙.下载链接: http://source.android.com/compatibil

Android CTS测试

一什么是CTS CTS简介:Compatibility Test suite系列兼容测试 google定义了一个兼容性规范(Compatible Definition),而CTS就是为了确保某个测试符合该规范.从而基于Android的应用程序能在基于同一个api版本的设备上面运行.通过CTS测试的device可以获得android的商标,并且享受android market的权限. 例如手机.平板电脑.车载娱乐系统:严格来说需要下载第三方应用的Android系统都要通过CTS测试,才能达到兼容性

Android CTS(frome google)

Compatibility Test Suite How does the CTS work? The Compatibility Test Suite (CTS) is a free, commercial-grade test suite, available for download. The CTS represents the "mechanism" of compatibility. The CTS runs on a desktop machine and execute