cts测试流程

首先要有cts测试工具,然后进入tools下,执行cts-tradefed

如果提示没有aapt,需要下载android 的aapt 然后放到bin目录下,并修改权限为777

如果逐条测试

执行run cts -m "类名" -t "case名"

例如:

arm64-v8a CtsAccessibilityServiceTestCases
Test Result Details
android.accessibilityservice.cts.AccessibilityGestureDispatchTest#testClickWhenMagnified_matchesActualTouch
fail
junit.framework.AssertionFailedError: Did not receive required events. Got:[]filtered:[]at junit.framework.Assert.fail(Assert.java:50)at junit.framework.Assert.assertTrue(Assert.java:20)at android.accessibilityservice.cts.AccessibilityGestureDispatchTest.waitForMotionEvents(AccessibilityGestureDispatchTest.java:565)at android.accessibilityservice.cts.AccessibilityGestureDispatchTest.testClickWhenMagnified_matchesActualTouch(AccessibilityGestureDispatchTest.java:344)at java.lang.reflect.Method.invoke(Native Method)at android.test.InstrumentationTestCase.runMethod(InstrumentationTestCase.java:220)at android.test.InstrumentationTestCase.runTest(InstrumentationTestCase.java:205)at android.test.ActivityInstrumentationTestCase2.runTest(ActivityInstrumentationTestCase2.java:192)at junit.framework.TestCase.runBare(TestCase.java:134)at junit.framework.TestResult$1.protect(TestResult.java:115)at android.support.test.internal.runner.junit3.AndroidTestResult.runProtected(AndroidTestResult.java:77)at junit.framework.TestResult.run(TestResult.java:118)at android.support.test.internal.runner.junit3.AndroidTestResult.run(AndroidTestResult.java:55)at junit.framework.TestCase.run(TestCase.java:124)at android.support.test.internal.runner.junit3.NonLeakyTestSuite$NonLeakyTest.run(NonLeakyTestSuite.java:63)at android.support.test.internal.runner.junit3.AndroidTestSuite$2.run(AndroidTestSuite.java:111)at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:457)at java.util.concurrent.FutureTask.run(FutureTask.java:266)at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1162)at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636)at java.lang.Thread.run(Thread.java:764)

 run cts -m

CtsAccessibilityServiceTestCases

-t

android.accessibilityservice.cts.AccessibilityGestureDispatchTest#testClickWhenMagnified_matchesActualTouch

如果是复测

需要将上次跑的结果复制到cts的results下面,然后执行 l r

会显示如下:

cts-tf > l r
Session  Pass    Fail  Modules Complete  Result Directory     Test Plan           Device serial(s)             Build ID         Product       
0        382694  523   207 of 211        2018.02.11_12.56.52  cts-reference-aosp  2223106, 1729a10b            OTR1.171205.001  aosp_arm64_a  
1        383499  50    210 of 211        2018.02.22_18.30.44  cts                 2223106, 46a490be, 1729a10b  OTR1.171205.001  aosp_arm64_a  
2        1       1     2 of 2            2018.02.23_08.53.50  cts                 46a490be                     OTR1.171205.001  aosp_arm64_a  

然后可以看到你复制的结果是哪一项,比如我的是cts-reference-aosp,session为0

执行如下run cts -r 0 --skip-preconditions




你可能感兴趣的:(android)