简体   繁体   中英

Running CTS on Moto G

I am planning to run CTS on Moto G. However no test cases are executing.

Is there any configuration required on the device to run the CTS?

I'm using the following command to run an individual TC:

cts-tf > run cts -c android.app.cts.AlertDialog_BuilderTest -m testSetMultiChoiceItemsWithParamCursor
10-08 13:02:43 I/TestInvocation: Starting invocation for 'cts' on build '5.1_r2' on device TA933076PK
10-08 13:02:43 I/TA933076PK: Created result dir 2015.10.08_13.02.43
10-08 13:02:43 I/CtsTest: ABIs: [armeabi-v7a]
10-08 13:03:03 I/TA933076PK: Collecting device info
10-08 13:03:06 I/CtsTest: Start test run of 0 packages, containing 0 tests
10-08 13:03:06 I/TA933076PK: Saved log device_logcat_809062082889179408.zip
10-08 13:03:06 I/TA933076PK: Saved log host_log_6848598452983732815.zip
10-08 13:03:06 I/TA933076PK: Created xml report file at <<PATH>>
015.10.08_13.02.43\testResult.xml
10-08 13:03:07 I/TA933076PK: XML test result file generated at 2015.10.08_13.02.43. Passed 0, Failed 0, Not Executed 0
10-08 13:03:07 I/TA933076PK: Time: 23s

I had the same problem. First, make sure you run CTS on Linux, there are solutions for running it on Windows but as of Android 6.0 it won't run on Windows.

For me, I had this problem as I've downloaded the wrong CTS package. Make sure you download the correct package, there is for x86 and Arm. I needed the Arm one and when trying to run it on x86 I've got the same issue.

Running CTS on Moto G

if you are running kitkat install Java 6 or Lollipop install Java 7 http://source.android.com/compatibility/cts/setup.html

Run all testcases run cts --plan CTS Individual testcases run cts -c " " -p " "

Whole pacakge testcases run cts -p com.android.wifi

1.adb install -r android-cts/repository/testcases/CtsDeviceAdmin.apk - common for all version :

adb install -r android-cts/repository/testcases/CtsDelegatingAccessibilityService.apk

Permission to be enabled for the apk

Settings > Security > Select device administrators.

2.Check the CTS tool type ARM or X86.

For CTS version 6.0 and above :
1.Media file push is necessary 
  if willing to run single case without any precondition then
  run cts -c <class> -m <method> --skip-preconditions

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM