这两天一直在搞 Android 4.1 CTS ,每次完整跑完一遍后总有几百项 failed,用编辑器手动改为 notExecuted 项后重新跑,有很多项第二次都跑过了。

但是发现直接修改也带来很多问题。如下:

1. 最初是这样的

<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. 然后我直接修改result="fail" 为result="notExecuted",重新全部跑了一遍后,虽然这条执行通过了,但是:

<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>

可以看到仅仅是结果 改掉了,其他第一次运行时失败信息却保留了下来。。

这样似乎是有点问题的。于是我在 linux 下面写了一个 小程序,用于 修改 testResult.xml。完美解决问题。

源码下载地址:


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



更多相关文章

  1. Android(安卓)Cupcake源码编译笔记
  2. Android事件分发机制详解(二)
  3. Android(安卓)Mms 源码结构
  4. Handler、Looper与MessageQueue源码分析
  5. FFMPEG移植到Android(ubuntu环境下)
  6. Android源代码分析(二) MediaScanner源码分析(上)
  7. Android简易订机票系统
  8. Android开发问题记录(二)——Eclipse不显示Android(安卓)SDK&AVD M
  9. Android原生(Native)C开发之三:鼠标事件篇(捕鼠记)

随机推荐

  1. 多区域 OSPF 综合实验
  2. aelf技术——解除区块链商业化痛点的一剂
  3. 关于VSTO 加载项的破解
  4. Cyberspace贝尔实验室的计划9!
  5. Oracle OCP 071中文考试题库-第17题
  6. 身份认证之多因素身份认证(MFA)
  7. 云计算,变革来临时
  8. 红帽认证有用吗?哪些人适合报考红帽认证?
  9. linux使用zip修改文件内容
  10. 如何在 Mac 上的“照片”中将色阶调整应