android Cts 测试

cts的运行是建立在有android sdk,否则需要下载,

1,设置cts环境,需要下载cts sdk, 在这个site http://source.android.com/compatibility/downloads.html 可以下到。使用android的源码也可以编译,但是推荐下载最新的cts;

2,Configuring CTS
     Option A - On Linux (Ubuntu or MAC)
    This Option must be used for CTS Submissions.
1.       To configure CTS, extract the contents of the zip file
2.       Edit the android-cts/tools/startcts script - modify the variable SDK_ROOT to match your environment.
Example:
SDK_ROOT=/home/myuser/android-sdk-linux_x86-1.6_pre_r1
This should point to the top-level directory where you unzipped the Android SDK to. 
Option B - On Windows
This Option is only available for developers to debug CTS failures. Test teams DO NOT USE WINDOWS TO RUN CTS. No additional support will be given outside of this section. Google designed CTS to run only in Linux.
1.       Save and unzip this batch script to android-cts/tools/ folder, and set SDK_ROOT=path of the SDK.
2.       Right click "My Computer", select Properties->Advanced tab->Environment variables
3.       Create new User Variable "CTS_ROOT", set Value to path of CTS root folder (i.e. D:\Android\CTS\android-cts)
4.       Create new User Variable: ANDROID_ROOT, set Value to path of SDK root folder (i.e. D:\Android\android-sdk-windows-1.6_r1)
5.       Edit System Variable: Path, append the path of SDK root folder/tools (i.e. D:\Android\android-sdk-windows\tools\)
6.     Also append the path of C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;c:\ntutils; before the path pf SDK root folder/tools.


3,Execute CTS
1.       Start cts (from Linux terminal) bash startcts, or (from  Windows command prompt) startcts
2.       Run a test (suite) package (i.e. android.net) from test plan (Android) by entering the test command "start --plan Android -p android.net"
3.       Run a test case "start --plan Android -t android.widget.cts.GridViewTest#testPressKey"
4.       For a complete list of CTS commands, please refer to the User Manual.
5.       You can refer to android-cts\repository\testcases\*.xml


  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值