I have been conducting Android compatibility tests recently. I started the tests after configuring device according to Android-cts-manual provided on the android official website.
First, configure the software environment: 1. Download the Android-2.1 system and compile it.
$
. Build/envsetup. Sh // configure options and compile the android source code
$
Make CTS // After compiling the android source code, compile the cts
2. The file location generated after the CTS is compiled is as follows # mydroid/out/host/linux-x86/the directory contains the following test file
- 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. Connect to the device and enter the following directory: # My Droid/out/host/linux-x86/bin/ Enter./CTS to start the CTS test. The effect is as follows: Android
CTS version 2.1 _ pre_r2 Device (0123456789 abcedf)
Connected Cts_host
> Enter
Help will list all CTS operations. Cts_host>
Ls -- Plan // list all test plan Cts_host> ls-P
// List all testcase Cts_host> Start
-- Plan [Plan Name] // test plan ............. .............
4. Enter the Directory # Mydroid/out/host/linux-x86/CTS/Android-CTS/Repository/plans We will see eight base classes for testing. They are Android. xml
Appsecurity. xml CTS. xml Java. xml Performance. xml Refapp. xml Signature. xml VM. xml After opening these files with ultraedit, you will see all the packages contained in the base class.
The corresponding URI is provided, CTS tests the package in each base class based on these Uris,
5. cts_host
> Start -- Plan android Enter the preceding command to start the test.
Android API, and other test commands are the same as this, as shown below: 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. After testing, run the following command to view the test result: Cts_host
> Ls-R 7. The CTS test will automatically generate the corresponding test package, which is located in the following directory :# Mydroid/out/host/linux-x86/CTS/Android-CTS/Repository/results Each test package contains the following files; Cts_result.css Cts_result.xsl Logo.gif Newrule-green.png Testresult. xml The testing results of this package are Testresult. xml
In the file, you can know by viewing the file, which are Android compatible ,,
8. Unsolved Problems During the test, ADB restarts. After the ADB restarts, the device is disconnected. In this case, you need to unplug the USB and plug it in before testing again, How to solve this problem remains to be studied ,,
9. Several good reference websites Http://source.android.com/compatibility/index.html // Android compatibility 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