android Cts 測試

來源:互聯網
上載者:User

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

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.