In the android CTS result, testresult. xml modifies the Fail item to notexecuted item for analysis.

Source: Internet
Author: User

Android 4.1 CTS has been running for the past two days. After each full run, there will always be several hundred failed items. Use the editor to manually change to the notexecuted item and run it again, many items have been run for the second time.

However, direct modification also causes many problems. As follows:

1. This was initially the case

<Test name = "testvolume" result = "fail" starttime = "Thu Jun 13 22:41:08 CST 2013" endtime = "Thu Jun 13 22:41:10 CST 2013"> <failedscene message = "JUnit. framework. assertionfailederror: expected: <2> but was: <1> at Android. media. CTS. audiomanagertest. testvolume (audiomanagertest. java: 337) "> <stacktrace> JUnit. framework. assertionfailederror: expected: <2> but was: <1> at Android. media. CTS. audiomanagertest. testvolume (audiomanagertest. java: 337) at java. lang. reflect. method. invokenative (native method) at Android. test. androidtestrunner. runtest (androidtestrunner. java: 190) at Android. test. androidtestrunner. runtest (androidtestrunner. java: 175) at Android. test. instrumentationtestrunner. onstart (instrumentationtestrunner. java: 555) at Android. app. instrumentation $ instrumentationthread. run (instrumentation. java: 1584) </stacktrace> </failedscene> </test>

2. Then I directly modify result = "fail" to result = "notexecuted" and run it all over again. Although this execution is successful, however:

<Test name = "testvolume" result = "pass" starttime = "Thu Jun 13 22:41:08 CST 2013" endtime = "Thu Jun 13 22:41:10 CST 2013">

<FailedScene message="junit.framework.AssertionFailedError: expected:<2> but was:<1>at android.media.cts.AudioManagerTest.testVolume(AudioManagerTest.java:337)"><StackTrace>junit.framework.AssertionFailedError: expected:<2> but was:<1>at android.media.cts.AudioManagerTest.testVolume(AudioManagerTest.java:337)at java.lang.reflect.Method.invokeNative(Native Method)at android.test.AndroidTestRunner.runTest(AndroidTestRunner.java:190)at android.test.AndroidTestRunner.runTest(AndroidTestRunner.java:175)at android.test.InstrumentationTestRunner.onStart(InstrumentationTestRunner.java:555)at android.app.Instrumentation$InstrumentationThread.run(Instrumentation.java:1584)</StackTrace></FailedScene></Test>

We can see that only the results are modified, but other failed information is retained during the first running ..

This seems to be a problem. So I wrote a small program in Linux to modify testresult. xml. Perfect solution.

Source code:

Http://download.csdn.net/detail/langrenyijiu/5627199


Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.