cts test command for 7.0
run cts –mCtsAppTestCases –#testAddTab –skip-preconditions
download
Open the following URL,
/compatibility/
Taking 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 cannot open the URL above, it means that the Internet has not crossed the wall. After you crossed the wall online, you can open the web page.
My configuration method: Modify the browser's proxy and set the automatic configuration proxy URL to: http://10.5.2.98/
Configuration
The PC jdk environment required by Android 5.0 is jdk1.7, and switches jdk to 1.7
Different versions of Android correspond to different versions of jdk. Check it online and modify the jdk version of pc;
3. Link to the mobile phone
Link to the mobile phone, enable usb debugging, and confirm that the computer has been linked to the mobile phone
Run adb devices on the terminal to confirm whether the phone is connected.
4. Run CTS
Unzip the download file Android 5.0 R1 Compatibility Test Suite (CTS) - ARM,
Enter android-cts/tools/ and execute the cts-tradefed script file.
5. Set up a mobile phone
1. The language is set to English;
2. When testing CTS, the device cannot be in hibernation state. Enter the security option and set the screen lock to none.
It may be different, in short, you need to cancel the lock screen;
3. Turn on GPS;
4. Connect to a WiFi network that can surf the wall;
5. Turn on USB debugging, check Stay wake, and Allow mock locations;
6. After installation, check the first two items of Device administrators;
Among them, it is located in the downloaded cts decompression package directory;
under android-cts/repository/testcases.
At this point, the basic configuration is completed. If you are a developer, you generally don’t need to run all cases, you just need to run your own case and it’s OK.
If you run all cases, after the 4 steps are completed, enter the pop-up terminal.
run cts –plan CTS。
For developers running specific cases:
1. Test package
A. run cts -p <package name>. Parameter -p refers to a package that is tested. For example, to test all cases under the package, execute the command:
run cts -p
B. Test a class: run cts -c <class name>. The package name needs to be added before the class name. The parameter -c refers to a class that is tested. For example, to test the AudioTrackTest class under the package, execute the command:
run cts -c
C. Test case in a class: run cts -c <class name> -m