Android CTS Test

Source: Internet
Author: User

What is a CTS test? Before we get to know this question, let's search the "Google GMS certification" first. GMS is all called googlemobile service, or Google Mobile services. The GMS is actually a collection of Google Apps. Google's GMS certification (Google Mobile Services Test certification) is the compatibility and stability of a variety of smart hardware products that Google has built to ensure the design and production of Android-based hardware manufacturers around the world. As well as the compatibility, stability testing and certification of these hardware and the various software app products and services that the android comes with.

What do Google GMS certifications need to test? CTS,GTS,CTSVERIFIER,AFW .....

CTS: English for compatibilitytest Suite, Chinese means compatibility test, the device needs to pass the Android Compatibility Test (CTS), to ensure that the program developed on Android will work on the device.

First, Environment construction

To configure environment variables:

JDK 1.8

SDK (Purpose: ADB AAPT environment configuration)

Required Resources for testing: (Download CTS kit for the corresponding version of the device under test)

CTS Test Pack: Android 6.0 R20 Compatibility Test suite (CTS)-x86

CTS Verification Program: Android 6.0 R20 Verifier

CTS Library: CTS Media 1.3

Android 6.0 device (take android6.0 as an example)

Note: Although CTS can be tested under Windows, there are more problems (some do not support working under window). It's best to test under Linux or Mac.

Second, pre-test preparation (Android device settings)

1, the device factory Reset: Settings > Backup and reset > Restore factory settings

2. The language of the device is set to English (United States): Settings > Language & input > language

3. Open Location information: Settings > Location information

4. WiFi Connection: Settings > Wireless

5. Screen lock is set to none: Settings > Security Settings > Screen > None

6. Ensure time setting 12 Hour format: Set > Date & Time

7. Turn on USB debugging: setup > Developer options > USB debugging.

8. Select: Settings > Developer Options > Keep the screen lit

9. Select: Settings > Developer Options > Allow impersonation location

Note: This analog location setting is only available for Android 5.x and 4.4.x.

10. Launch the browser and close any startup/Setup screens.

11. Connect the computer with a USB cable

/* **12, install and configure the secondary application on the device.

Note: CTS version 2.1 R2 through 4.2 R4, set up your device (or emulator) to run the accessibility test:

ADB install-r android-cts/repository/testcases/ctsdelegatingaccessibilityservice.apk

On the device Settings > Accessibility > Accessibility > Delegating accessibility Service

Note: Before CTS version 7.0, the device declares Android.software.device_admin to run, set up your device to test device management using:

ADB install-r android-cts/repository/testcases/ctsdeviceadmin.apk

In Settings > Security > Select Device Administrator, make two android.deviceadmin.cts.CtsDeviceAdminReceiver * device administrators.

Ensure that the android.deviceadmin.cts.CtsDeviceAdminDeactivatedReceiver and any other preload device administrators are still disabled. */

13. CTS media files are copied to the device:

Note: After 2.3 cts R12, if the device supports video codecs, the CTS media files must be copied to the device.

Third, run CTS test

Operation under Linux system:

Download the media file and unzip it.

1. Change file permissions: chmod U + x copy_media.sh

2, run copy_media.sh Copy all files, multiple devices copy_media.sh-s <specific device>

3. Enter the Android-cts/tools directory and run the script cts-tradefed

The actions under window are:

1, decompression android-cts-media-1.3

2. Copy the Bbb_full,bbb_short from the android-cts-media-1.3 directory to the/sdcard/test/directory of the device (no new test folder is created)

3, Decompression android-cts-6.0_r20-linux_x86-x86

4. Under Android-cts-6.0_r20-linux_x86-x86 directory, create a new Run.bat file in the same directory as Android-cts

5. Copy the following code into the Run.bat file. Note: The last line of the class that needs to be viewed in the \android-cts\tools\cts-tradefed file

@echo off Set cts_root=%~dp0set jar_dir=%cts_root%android-cts\toolsset jar_path=%jar_dir%\ Cts-tradefed.jar;%jar_dir%\tradefed-prebuilt.jar;%jar_dir%\hosttestlib. jarjava-cp%jar_path%-dcts_root=%cts_root% com.android.cts.tradefed. command. Ctsconsole

6. Double-click to run the Run.bat file

Iv. Basic command of the CTS

* * If you run all CTS test case, you can enter the following command directly

Run CTS--plan CTS

* * If you test GTS, you can enter the following commands directly

Run GTS--plan GTS (previously: Run XTS--plan xts)

* * If you are testing only some of the case in the CTS, just enter the following command

Run Cts-p [Packgename] #测试指定包下的所有case

Run Cts-c [ClassName]-M [MethodName] #单测method一case

category Command Description
Host Help Basic Command Help description
Help All All commands help explain
Exit Exit the console
Run Run CTS--plan Test_plan_name Run the specified schedule
Run CTS--package/-p Run the specified package
Run CTS--class/-c [--METHOD/-M] Run the specified method
Run CTS--continue-session session_id Continue running the specified callback ID
Run CTS [options]--serial/-s device_id Run the specified device
Run CTS [Options]--shardsnumber_of_shards Running multiple devices
Run CTS--help/--help-all Run Help
List L/list d/devices List Connected devices
L/list Packages List all test packages
L/list P/plans List all test plans
L/list R/results List the results that have been saved

V. CTS TEST Results

The results of the CTS test are in the Testresults.xml file in the Android-cts/repository/results directory under the directory named Start test time.

The CTS test log file is in a zip file in the Android-cts/repository/logs directory

To view the Android website:

"" Download

"" "Set

"" Running CTS

Android CTS Test

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

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.