How to run CTS (Compatibility Test Suite) on Android 4.0.3

19,340

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:

  1. Your device should be running a user build (Android 4.0 and later)from source.android.com
  2. Please refer to this linkon the Android developer site and set up your device accordingly.
  3. Make sure that your device has been flashed with a user build (Android 4.0 and later) before you run CTS.
  4. 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)
  5. 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.
  6. Do a factory data reset on the device (Settings > storage > Factory data reset). Warning: This will erase all user data from the device.
  7. Make sure no lock pattern is set on the device (Settings > Security > Screen Lock should be 'None').
  8. Make sure the "USB Debugging" development option is checked (Settings > Developer options > USB debugging). Google Confidential
  9. Make sure Settings > Developer options > Stay Awake is checked
  10. Make sure Settings > Developer options > Allow mock locations is checked
  11. Make sure device is connected to a functioning Wi-Fi network (Settings > Wi-Fi)
  12. Make sure the device is at the home screen at the start of CTS (Press the home button).
  13. While a device is running tests, it must not be used for any other tasks.
  14. 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.
  15. Set up accessibility tests: 1. adb install android-cts/repository/testcases/ CtsDelegatingAccessibilityService.apk
    1. On the device, enable Settings > Accessibility > Delegating Accessibility Service
  16. Set up device administration tests: 1. adb install android-cts/repository/testcases/CtsDeviceAdmin.apk
    1. On the device, enable Settings > Security > Device Administrators > android.deviceadmin.cts.CtsDeviceAdmin* settings
  17. 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:

    1. Download the android-cts-media-X.Y.zip file compatibility/downloads.html and unzip it.
    2. Connect the device to the computer and check that adb can connect to it.
    3. cd to the unzipped folder.
    4. chmod 544 copy_media.sh
    5. 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:

  1. 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
  2. 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.
  3. Alternately, you can just run a CTS plan from the command line using cts-tradefed run cts --plan
  4. You should test progress and results reported on the console.
Share:
19,340
RkeTest
Author by

RkeTest

Updated on October 23, 2022

Comments

  • RkeTest
    RkeTest over 1 year

    I want to run CTS (Compatibility Test Suite) on Android 4.0.3 device. Can anybody provide me the complete steps to do that. I am using Ubuntu Linux machine to connect to the device. I have downloaded CTS files from http://source.android.com/compatibility/downloads.html.

    Please provide me the steps for the same.

    Regards Rke