you can read the steps from Compatibility Test Suite Manual after you download “Compatibility Test Suite (CTS) User Manual” from http://source.android.com/compatibility/downloads.html.
i copy the steps from the manual files.
Setting up your device
CTS can be executed only on consumer devices.
This section is important as not following these instructions will lead to test timeouts/
failures:
- Your device should be running a user build (Android 4.0 and later)from
source.android.com
- Please refer to this linkon the Android developer site and set up your device
accordingly.
- Make sure that your device has been flashed with a user build (Android 4.0 and
later) before you run CTS.
- You need to ensure the Text To Speech files are installed on the device. You can
check via Settings > Speech synthesis > Install voice data before running CTS
tests. (Note that this assumes you have Android Market installed on the device, if
not you will need to install the files manually via adb)
- Make sure the device has a SD card plugged in and the card is empty. Warning:
CTS may modify/erase data on the SD card plugged in to the device.
- Do a factory data reset on the device (Settings > storage > Factory data reset).
Warning: This will erase all user data from the device.
- Make sure no lock pattern is set on the device (Settings > Security > Screen Lock
should be 'None').
- Make sure the "USB Debugging" development option is checked (Settings >
Developer options > USB debugging).
Google Confidential
- Make sure Settings > Developer options > Stay Awake is checked
- Make sure Settings > Developer options > Allow mock locations is checked
- Make sure device is connected to a functioning Wi-Fi network (Settings > Wi-Fi)
- Make sure the device is at the home screen at the start of CTS (Press the home
button).
- While a device is running tests, it must not be used for any other tasks.
- Do not press any keys on the device while CTS is running. Pressing keys or
touching the screen of a test device will interfere with the running tests and may
lead to test failures.
- Set up accessibility tests:
1.
adb install android-cts/repository/testcases/
CtsDelegatingAccessibilityService.apk
- On the device, enable Settings > Accessibility > Delegating Accessibility
Service
- Set up device administration tests:
1.
adb install android-cts/repository/testcases/CtsDeviceAdmin.apk
- On the device, enable Settings > Security > Device Administrators >
android.deviceadmin.cts.CtsDeviceAdmin* settings
Copy the CTS media files to your device using ADB with the instructions below:
The CTS media stress tests require video clips to be on external storage (/sdcard).
Most of the clips are from Big Buck Bunny which is copyrighted by the Blender
Foundation under the Creative Commons Attribution
3.0license. The required space depends on the maximum video playback resolution
supported by the device. By default, 176x144 and 480x360 SHOULD be supported.
Note that the video playback capabilities of the device under test will be checked via
the android.media.CamcorderProfile APIs.
Here are the storage requirements by maximum video playback resolution:
● 480x360: 91.4MB
● 720x480: 151.9MB
● 1280x720: 401.6MB
● 920x1080: 1008.2MB
Instructions to copy the media files to a device:
- Download the android-cts-media-X.Y.zip file
compatibility/downloads.html and unzip it.
- Connect the device to the computer and check that adb can connect to it.
- cd to the unzipped folder.
- chmod 544 copy_media.sh
- Run copy_media.sh
○ To copy clips for just the default resolutions, run ./copy_media.sh.
Google Confidential
○ To copy clips up to a resolution of 720x480, run ./copy_media.sh 720x480.
○ If you are not sure about the maximum resolution, try 1920x1080 so that all
files are copied.
○ If there are multiple devices under adb, add -s serial option to the end.
For example, to copy up to 720x480 to device with serial 1234567, run
copy_media.sh 720x480 -s 1234567.
Using the CTS
To run a test plan:
- Make sure you have at least one device connected. Launch the CTS console by
running the cts-tradefedscript e.g.
$ ./android-cts/tools/cts-tradefed
- You may start the default test plan (containing all of the test packages) by
typingrun cts --plan CTS. This will kick off all the CTS tests required for
compatibility.
Type list plansto see a list of test plans in the repository.Type list packages to see
a list of test packages in the repository.
See the CTS command reference or type helpfor a complete list of supported
commands.
- Alternately, you can just run a CTS plan from the command line using cts-tradefed run cts --plan
- You should test progress and results reported on the console.