Detailed Explanation of android cts Test Methods and Steps

  • 2021-09-12 02:12:07
  • OfStack

cts Test Command for 7.0

run cts mCtsAppTestCases tAndroid. app. cts. ActionBarTest # testAddTab skip-preconditions

1. CTS download

Open the following URL,

http://source.android.com/compatibility/downloads.html

Take android5.0 as an example. After entering the page, click Android 5.0 R1 Compatibility Test Suite (CTS)-ARM to download;

Of course, if you can't open the above website, it is that the network has not climbed over the wall. After the network has climbed over the wall, you can open the webpage.

My configuration: Modify the browser's proxy to set the auto-configuration proxy URL to: http://10.5.2.98/proxy. pac

2. JDK configuration

android 5.0 requires an PC jdk environment of jdk 1.7 and switches jdk to 1.7

Different versions of android correspond to different versions of jdk. Check 1 on the Internet and modify the jdk version of pc;

3. Link your phone

Link the mobile phone, start usb debugging, and confirm that the computer has been linked to the mobile phone

The terminal runs adb devices to confirm whether the mobile phone is linked well.

4. Run CTS

Unzip and download the file Android 5.0 R1 Compatibility Test Suite (CTS)-ARM,

Enter android-cts/tools/ and execute the cts-tradefed script file.

Step 5 Set up your phone

1. The language is set to English;;

2. When testing CTS, the device cannot be in sleep state. Enter security option and set the screen lock to none

It may not be 1, in short, it is necessary to cancel the lock screen;

3. Turn on GPS;;

4. Connect a wall-turning Wifi network;

5. Start USB debugging, check Stay awake, Allow mock locations;

6. Check the first two items of Device administrators after installing CtsDeviceAdmin. apk;

Among them, CtsDeviceAdmin. apk is located in the downloaded cts decompression package directory;

android-cts/repository/testcases.

At this point, the basic configuration is completed. If you are a developer, you don't need to run all case, just run your own case on ok.

If you run all case, enter it on the pop-up terminal after the 4-step operation

run cts plan CTS.

For developers to run specific case:

STEP 1 Test kit

A. run cts-p < Package name > . The parameter-p means that one package is tested. For example, to test all case under the android. view. cts package, execute the command:
run cts -p android.view.cts

B. Test 1 class: run cts-c < Class name > . The class name needs to be preceded by the package name, and the parameter-c means that one class is tested. For example, to test the AudioTrackTest class under the android. media. cts package, execute the command:

run cts -c android.media.cts.AudioTrackTest

C. Testing case in 1 class: run cts-c < Class name > -m


Related articles: