在Android设备上运行DumpRenderTree

时间:2012-05-23 19:02:35

标签: android

我一直在尝试在Android上运行DumpRenderTree测试(在运行ICS的Android设备上),我无法弄清楚如何运行它。文档很少,我发现的唯一其他主题(这与我的问题很接近)是:

How do you push Android Instrumentation Tests to Emulator/Device?

运行此命令时,这是我的ddms输出:

05-23 11:59:07.118: INFO/TestRunner(10253): started: warning(junit.framework.TestSuite$1)
05-23 11:59:07.118: INFO/TestRunner(10253): failed: warning(junit.framework.TestSuite$1)
05-23 11:59:07.118: INFO/TestRunner(10253): ----- begin exception -----
05-23 11:59:07.118: INFO/TestRunner(10253): junit.framework.AssertionFailedError: No tests found in com.android.dumprendertree.LayoutTestsAutoTest
05-23 11:59:07.118: INFO/TestRunner(10253):     at junit.framework.Assert.fail(Assert.java:47)
05-23 11:59:07.118: INFO/TestRunner(10253):     at junit.framework.TestSuite$1.runTest(TestSuite.java:263)
05-23 11:59:07.118: INFO/TestRunner(10253):     at junit.framework.TestCase.runBare(TestCase.java:127)
05-23 11:59:07.118: INFO/TestRunner(10253):     at junit.framework.TestResult$1.protect(TestResult.java:106)
05-23 11:59:07.118: INFO/TestRunner(10253):     at junit.framework.TestResult.runProtected(TestResult.java:124)
05-23 11:59:07.118: INFO/TestRunner(10253):     at junit.framework.TestResult.run(TestResult.java:109)
05-23 11:59:07.118: INFO/TestRunner(10253):     at junit.framework.TestCase.run(TestCase.java:118)
05-23 11:59:07.118: INFO/TestRunner(10253):     at android.test.AndroidTestRunner.runTest(AndroidTestRunner.java:169)
05-23 11:59:07.118: INFO/TestRunner(10253):     at android.test.AndroidTestRunner.runTest(AndroidTestRunner.java:154)
05-23 11:59:07.118: INFO/TestRunner(10253):     at android.test.InstrumentationTestRunner.onStart(InstrumentationTestRunner.java:537)
05-23 11:59:07.118: INFO/TestRunner(10253):     at android.app.Instrumentation$InstrumentationThread.run(Instrumentation.java:1551)
05-23 11:59:07.118: INFO/TestRunner(10253): ----- end exception -----
05-23 11:59:07.126: INFO/TestRunner(10253): finished: warning(junit.framework.TestSuite$1)
05-23 11:59:07.126: INFO/TestRunner(10253): started: warning(junit.framework.TestSuite$1)
05-23 11:59:07.126: INFO/TestRunner(10253): failed: warning(junit.framework.TestSuite$1)
05-23 11:59:07.126: INFO/TestRunner(10253): ----- begin exception -----
05-23 11:59:07.126: INFO/TestRunner(10253): junit.framework.AssertionFailedError: No tests found in com.android.dumprendertree.LoadTestsAutoTest
05-23 11:59:07.126: INFO/TestRunner(10253):     at junit.framework.Assert.fail(Assert.java:47)
05-23 11:59:07.126: INFO/TestRunner(10253):     at junit.framework.TestSuite$1.runTest(TestSuite.java:263)
05-23 11:59:07.126: INFO/TestRunner(10253):     at junit.framework.TestCase.runBare(TestCase.java:127)
05-23 11:59:07.126: INFO/TestRunner(10253):     at junit.framework.TestResult$1.protect(TestResult.java:106)
05-23 11:59:07.126: INFO/TestRunner(10253):     at junit.framework.TestResult.runProtected(TestResult.java:124)
05-23 11:59:07.126: INFO/TestRunner(10253):     at junit.framework.TestResult.run(TestResult.java:109)
05-23 11:59:07.126: INFO/TestRunner(10253):     at junit.framework.TestCase.run(TestCase.java:118)
05-23 11:59:07.126: INFO/TestRunner(10253):     at android.test.AndroidTestRunner.runTest(AndroidTestRunner.java:169)
05-23 11:59:07.126: INFO/TestRunner(10253):     at android.test.AndroidTestRunner.runTest(AndroidTestRunner.java:154)
05-23 11:59:07.126: INFO/TestRunner(10253):     at android.test.InstrumentationTestRunner.onStart(InstrumentationTestRunner.java:537)
05-23 11:59:07.126: INFO/TestRunner(10253):     at android.app.Instrumentation$InstrumentationThread.run(Instrumentation.java:1551)
05-23 11:59:07.126: INFO/TestRunner(10253): ----- end exception -----
05-23 11:59:07.126: INFO/TestRunner(10253): finished: warning(junit.framework.TestSuite$1)

在我运行之前,我应该推进一些测试吗?任何指针都将非常感谢!

1 个答案:

答案 0 :(得分:0)

显示渲染树的一种棘手的方法是在股票android浏览器的URL栏中输入 about:debug.render.file

然后,您可以找到以 /mnt/sdcard/renderTree.txt 生成的文件。

同样, about:debug.dom.file 会产生DOM树输出。