简体   繁体   English

在Moto G上运行CTS

[英]Running CTS on Moto G

I am planning to run CTS on Moto G. However no test cases are executing. 我计划在Moto G上运行CTS。但是没有测试用例正在执行。

Is there any configuration required on the device to run the CTS? 设备是否需要配置才能运行CTS?

I'm using the following command to run an individual TC: 我正在使用以下命令来运行单个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. 首先,确保在Linux上运行CTS,有在Windows上运行它的解决方案,但从Android 6.0开始,它不能在Windows上运行。

For me, I had this problem as I've downloaded the wrong CTS package. 对我来说,我遇到了这个问题,因为我下载了错误的CTS包。 Make sure you download the correct package, there is for x86 and Arm. 确保下载正确的软件包,有x86和Arm。 I needed the Arm one and when trying to run it on x86 I've got the same issue. 我需要Arm一个,当试图在x86上运行它时,我遇到了同样的问题。

Running CTS on Moto G 在Moto G上运行CTS

if you are running kitkat install Java 6 or Lollipop install Java 7 http://source.android.com/compatibility/cts/setup.html 如果您正在运行kitkat安装Java 6或Lollipop安装Java 7 http://source.android.com/compatibility/cts/setup.html

Run all testcases run cts --plan CTS Individual testcases run cts -c " " -p " " 运行所有测试用例运行cts --plan CTS个别测试用例运行cts -c“” - p“”

Whole pacakge testcases run cts -p com.android.wifi 整个pacakge测试用例运行cts -p com.android.wifi

1.adb install -r android-cts/repository/testcases/CtsDeviceAdmin.apk - common for all version : 1.adb install -r android-cts / repository / testcases / CtsDeviceAdmin.apk - 所有版本通用:

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

Permission to be enabled for the apk 为apk启用权限

Settings > Security > Select device administrators.

2.Check the CTS tool type ARM or X86. 2.检查CTS工具类型ARM或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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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