AppCrawler 自动遍历跑异常,求助!!!!

潇洒ˇ瑶爷 · 2017年10月30日 · 最后由 思寒_seveniruby 回复于 2017年10月31日 · 1869 次阅读

在进行登录的时候,会报错,具体出错信息如下:
@seveniruby (思寒)

-clickedIndex=18 xpath=//[@class=\"android.widget.FrameLayout\" and @index=\"0\"]/[@class=\"android.support.v7.widget.RecyclerView\" and @index=\"0\"]/[@resource-id=\"com.xxxxx.lib.personal:id/personal_user_info_root\"]/[@resource-id=\"com.xxxxx.lib.personal:id/personal_user_info_root_draweeview\"]

-after clicked

-clickedIndex=19 xpath=//[@resource-id=\"com.xxxxx.lib.login:id/login_relative\"]/[@resource-id=\"com.xxxxx.lib.login:id/login_editor_layout\"]/[@resource-id=\"com.xxxxx.lib.login:id/login_page_input_name_layout\"]/[@resource-id=\"com.xxxxx.lib.login:id/login_input_name\"] *** FAILED ***
(Hide Details)
Message: 文件提前结束。
Exception: org.xml.sax.SAXParseException
com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(Unknown Source)
com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(Unknown Source)
javax.xml.parsers.DocumentBuilder.parse(Unknown Source)
com.xueqiu.qa.appcrawler.RichData$.toDocument(RichData.scala:26)
com.xueqiu.qa.appcrawler.TemplateTestCase$$anonfun$addTestCase$1$$anonfun$apply$3.apply(TemplateTestCase.scala:65)
org.scalatest.OutcomeOf$class.outcomeOf(OutcomeOf.scala:85)
org.scalatest.OutcomeOf$.outcomeOf(OutcomeOf.scala:104)
org.scalatest.Transformer.apply(Transformer.scala:22)
org.scalatest.Transformer.apply(Transformer.scala:20)
org.scalatest.FunSuiteLike$$anon$1.apply(FunSuiteLike.scala:186)
org.scalatest.TestSuite$class.withFixture(TestSuite.scala:196)
org.scalatest.FunSuite.withFixture(FunSuite.scala:1560)
org.scalatest.FunSuiteLike$class.invokeWithFixture$1(FunSuiteLike.scala:183)
org.scalatest.FunSuiteLike$$anonfun$runTest$1.apply(FunSuiteLike.scala:196)
org.scalatest.FunSuiteLike$$anonfun$runTest$1.apply(FunSuiteLike.scala:196)
org.scalatest.SuperEngine.runTestImpl(Engine.scala:289)
org.scalatest.FunSuiteLike$class.runTest(FunSuiteLike.scala:196)
org.scalatest.FunSuite.runTest(FunSuite.scala:1560)
org.scalatest.FunSuiteLike$$anonfun$runTests$1.apply(FunSuiteLike.scala:229)
org.scalatest.FunSuiteLike$$anonfun$runTests$1.apply(FunSuiteLike.scala:229)
org.scalatest.SuperEngine$$anonfun$traverseSubNodes$1$1.apply(Engine.scala:396)
org.scalatest.SuperEngine$$anonfun$traverseSubNodes$1$1.apply(Engine.scala:384)
scala.collection.immutable.List.foreach(List.scala:381)
org.scalatest.SuperEngine.traverseSubNodes$1(Engine.scala:384)
org.scalatest.SuperEngine.org$scalatest$SuperEngine$$runTestsInBranch(Engine.scala:379)
org.scalatest.SuperEngine.runTestsImpl(Engine.scala:461)
org.scalatest.FunSuiteLike$class.runTests(FunSuiteLike.scala:229)
org.scalatest.FunSuite.runTests(FunSuite.scala:1560)
org.scalatest.Suite$class.run(Suite.scala:1147)
org.scalatest.FunSuite.org$scalatest$FunSuiteLike$$super$run(FunSuite.scala:1560)
org.scalatest.FunSuiteLike$$anonfun$run$1.apply(FunSuiteLike.scala:233)
org.scalatest.FunSuiteLike$$anonfun$run$1.apply(FunSuiteLike.scala:233)
org.scalatest.SuperEngine.runImpl(Engine.scala:521)
org.scalatest.FunSuiteLike$class.run(FunSuiteLike.scala:233)
com.xueqiu.qa.appcrawler.TemplateTestCase.org$scalatest$BeforeAndAfterAllConfigMap$$super$run(TemplateTestCase.scala:13)
org.scalatest.BeforeAndAfterAllConfigMap$class.liftedTree1$1(BeforeAndAfterAllConfigMap.scala:248)
org.scalatest.BeforeAndAfterAllConfigMap$class.run(BeforeAndAfterAllConfigMap.scala:245)
com.xueqiu.qa.appcrawler.TemplateTestCase.run(TemplateTestCase.scala:13)
org.scalatest.Suite$class.callExecuteOnSuite$1(Suite.scala:1210)
org.scalatest.Suite$$anonfun$runNestedSuites$1.apply(Suite.scala:1257)
org.scalatest.Suite$$anonfun$runNestedSuites$1.apply(Suite.scala:1255)
scala.collection.IndexedSeqOptimized$class.foreach(IndexedSeqOptimized.scala:33)
scala.collection.mutable.ArrayOps$ofRef.foreach(ArrayOps.scala:186)
org.scalatest.Suite$class.runNestedSuites(Suite.scala:1255)
org.scalatest.tools.DiscoverySuite.runNestedSuites(DiscoverySuite.scala:30)
org.scalatest.Suite$class.run(Suite.scala:1144)
org.scalatest.tools.DiscoverySuite.run(DiscoverySuite.scala:30)
org.scalatest.tools.SuiteRunner.run(SuiteRunner.scala:45)
org.scalatest.tools.Runner$$anonfun$doRunRunRunDaDoRunRun$1.apply(Runner.scala:1340)
org.scalatest.tools.Runner$$anonfun$doRunRunRunDaDoRunRun$1.apply(Runner.scala:1334)
scala.collection.immutable.List.foreach(List.scala:381)
org.scalatest.tools.Runner$.doRunRunRunDaDoRunRun(Runner.scala:1334)
org.scalatest.tools.Runner$$anonfun$runOptionallyWithPassFailReporter$2.apply(Runner.scala:1011)
org.scalatest.tools.Runner$$anonfun$runOptionallyWithPassFailReporter$2.apply(Runner.scala:1010)
org.scalatest.tools.Runner$.withClassLoaderAndDispatchReporter(Runner.scala:1500)
org.scalatest.tools.Runner$.runOptionallyWithPassFailReporter(Runner.scala:1010)
org.scalatest.tools.Runner$.run(Runner.scala:850)
com.xueqiu.qa.appcrawler.Report$class.runTestCase(Report.scala:64)
com.xueqiu.qa.appcrawler.Report$.runTestCase(Report.scala:77)
com.xueqiu.qa.appcrawler.plugin.ReportPlugin.generateReport(ReportPlugin.scala:46)
com.xueqiu.qa.appcrawler.plugin.ReportPlugin.stop(ReportPlugin.scala:29)
com.xueqiu.qa.appcrawler.Crawler$$anonfun$6$$anonfun$apply$mcV$sp$1.apply(Crawler.scala:1077)
com.xueqiu.qa.appcrawler.Crawler$$anonfun$6$$anonfun$apply$mcV$sp$1.apply(Crawler.scala:1077)
scala.collection.immutable.List.foreach(List.scala:381)
scala.collection.generic.TraversableForwarder$class.foreach(TraversableForwarder.scala:35)
scala.collection.mutable.ListBuffer.foreach(ListBuffer.scala:45)
com.xueqiu.qa.appcrawler.Crawler$$anonfun$6.apply$mcV$sp(Crawler.scala:1077)
com.xueqiu.qa.appcrawler.Crawler$$anonfun$6.apply(Crawler.scala:1077)
com.xueqiu.qa.appcrawler.Crawler$$anonfun$6.apply(Crawler.scala:1077)
scala.util.Try$.apply(Try.scala:192)
com.xueqiu.qa.appcrawler.Crawler.stop(Crawler.scala:1077)
com.xueqiu.qa.appcrawler.Crawler$$anon$1.handle(Crawler.scala:1096)
sun.misc.Signal$1.run(Unknown Source)
java.lang.Thread.run(Unknown Source)

-after clicked

appcrawler log
-[32mcom.xxxxxx-LoginActivity:0m
-32m- clickedIndex=18 xpath=//[@class=\"android.widget.FrameLayout\" and @index=\"0\"]/[@class=\"android.support.v7.widget.RecyclerView\" and @index=\"0\"]/[@resource-----id=\"com.xxxxxx.lib.personal:id/personal_user_info_root\"]/[@resource-id=\"com.xxxxxx.lib.personal:id/personal_user_info_root_draweeview\"] 0m
-32m + 0m
-32m0m
-32m0m
-32m
0m
-32m

after clicked

0m
-32m0m
-32m 0m
-31m- clickedIndex=19 xpath=//[@resource-id=\"com.xxxxxx.lib.login:id/login_relative\"]/[@resource-id=\"com.xxxxxx.lib.login:id/login_editor_layout\"]/[@resource-i-d=\"com.xxxxxx.lib.login:id/login_page_input_name_layout\"]/[@resource-id=\"com.xxxxxx.lib.login:id/login_input_name\"] *** FAILED 0m
-31m org.xml.sax.SAXParseException: 鏂囦欢鎻愬墠缁撴潫銆?[0m
-31m at com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(Unknown Source) 0m
-31m at com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(Unknown Source) 0m
-31m at javax.xml.parsers.DocumentBuilder.parse(Unknown Source) 0m
-31m at com.xueqiu.qa.appcrawler.RichData$.toDocument(RichData.scala:26) 0m
-31m at com.xueqiu.qa.appcrawler.TemplateTestCase$$anonfun$addTestCase$1$$anonfun$apply$3.apply(TemplateTestCase.scala:65) 0m
-31m at org.scalatest.OutcomeOf$class.outcomeOf(OutcomeOf.scala:85) 0m
-31m at org.scalatest.OutcomeOf$.outcomeOf(OutcomeOf.scala:104) 0m
-31m at org.scalatest.Transformer.apply(Transformer.scala:22) 0m
-31m at org.scalatest.Transformer.apply(Transformer.scala:20) 0m
-31m at org.scalatest.FunSuiteLike$$anon$1.apply(FunSuiteLike.scala:186) 0m
-31m at org.scalatest.TestSuite$class.withFixture(TestSuite.scala:196) 0m
-31m at org.scalatest.FunSuite.withFixture(FunSuite.scala:1560) 0m
-31m at org.scalatest.FunSuiteLike$class.invokeWithFixture$1(FunSuiteLike.scala:183) 0m
-31m at org.scalatest.FunSuiteLike$$anonfun$runTest$1.apply(FunSuiteLike.scala:196) 0m
-31m at org.scalatest.FunSuiteLike$$anonfun$runTest$1.apply(FunSuiteLike.scala:196) 0m
-31m at org.scalatest.SuperEngine.runTestImpl(Engine.scala:289) 0m
-31m at org.scalatest.FunSuiteLike$class.runTest(FunSuiteLike.scala:196) 0m
-31m at org.scalatest.FunSuite.runTest(FunSuite.scala:1560) 0m
-31m at org.scalatest.FunSuiteLike$$anonfun$runTests$1.apply(FunSuiteLike.scala:229) 0m
-31m at org.scalatest.FunSuiteLike$$anonfun$runTests$1.apply(FunSuiteLike.scala:229) 0m
-31m at org.scalatest.SuperEngine$$anonfun$traverseSubNodes$1$1.apply(Engine.scala:396) 0m
-31m at org.scalatest.SuperEngine$$anonfun$traverseSubNodes$1$1.apply(Engine.scala:384) 0m
-31m at scala.collection.immutable.List.foreach(List.scala:381) 0m
-31m at org.scalatest.SuperEngine.traverseSubNodes$1(Engine.scala:384) 0m
-31m at org.scalatest.SuperEngine.org$scalatest$SuperEngine$$runTestsInBranch(Engine.scala:379) 0m
-31m at org.scalatest.SuperEngine.runTestsImpl(Engine.scala:461) 0m
-31m at org.scalatest.FunSuiteLike$class.runTests(FunSuiteLike.scala:229) 0m
-31m at org.scalatest.FunSuite.runTests(FunSuite.scala:1560) 0m
-31m at org.scalatest.Suite$class.run(Suite.scala:1147) 0m
-31m at org.scalatest.FunSuite.org$scalatest$FunSuiteLike$$super$run(FunSuite.scala:1560) 0m
-31m at org.scalatest.FunSuiteLike$$anonfun$run$1.apply(FunSuiteLike.scala:233) 0m
-31m at org.scalatest.FunSuiteLike$$anonfun$run$1.apply(FunSuiteLike.scala:233) 0m
-31m at org.scalatest.SuperEngine.runImpl(Engine.scala:521) 0m
-31m at org.scalatest.FunSuiteLike$class.run(FunSuiteLike.scala:233) 0m
-31m at com.xueqiu.qa.appcrawler.TemplateTestCase.org$scalatest$BeforeAndAfterAllConfigMap$$super$run(TemplateTestCase.scala:13) 0m
-31m at org.scalatest.BeforeAndAfterAllConfigMap$class.liftedTree1$1(BeforeAndAfterAllConfigMap.scala:248) 0m
-31m at org.scalatest.BeforeAndAfterAllConfigMap$class.run(BeforeAndAfterAllConfigMap.scala:245) 0m
-31m at com.xueqiu.qa.appcrawler.TemplateTestCase.run(TemplateTestCase.scala:13) 0m
-31m at org.scalatest.Suite$class.callExecuteOnSuite$1(Suite.scala:1210) 0m
-31m at org.scalatest.Suite$$anonfun$runNestedSuites$1.apply(Suite.scala:1257) 0m
-31m at org.scalatest.Suite$$anonfun$runNestedSuites$1.apply(Suite.scala:1255) 0m
-31m at scala.collection.IndexedSeqOptimized$class.foreach(IndexedSeqOptimized.scala:33) 0m
-31m at scala.collection.mutable.ArrayOps$ofRef.foreach(ArrayOps.scala:186) 0m
-31m at org.scalatest.Suite$class.runNestedSuites(Suite.scala:1255) 0m
-31m at org.scalatest.tools.DiscoverySuite.runNestedSuites(DiscoverySuite.scala:30) 0m
-31m at org.scalatest.Suite$class.run(Suite.scala:1144) 0m
-31m at org.scalatest.tools.DiscoverySuite.run(DiscoverySuite.scala:30) 0m
-31m at org.scalatest.tools.SuiteRunner.run(SuiteRunner.scala:45) 0m
-31m at org.scalatest.tools.Runner$$anonfun$doRunRunRunDaDoRunRun$1.apply(Runner.scala:1340) 0m
-31m at org.scalatest.tools.Runner$$anonfun$doRunRunRunDaDoRunRun$1.apply(Runner.scala:1334) 0m
-31m at scala.collection.immutable.List.foreach(List.scala:381) 0m
-31m at org.scalatest.tools.Runner$.doRunRunRunDaDoRunRun(Runner.scala:1334) 0m
-31m at org.scalatest.tools.Runner$$anonfun$runOptionallyWithPassFailReporter$2.apply(Runner.scala:1011) 0m
-31m at org.scalatest.tools.Runner$$anonfun$runOptionallyWithPassFailReporter$2.apply(Runner.scala:1010) 0m
-31m at org.scalatest.tools.Runner$.withClassLoaderAndDispatchReporter(Runner.scala:1500) 0m
-31m at org.scalatest.tools.Runner$.runOptionallyWithPassFailReporter(Runner.scala:1010) 0m
-31m at org.scalatest.tools.Runner$.run(Runner.scala:850) 0m
-31m at com.xueqiu.qa.appcrawler.Report$class.runTestCase(Report.scala:64) 0m
-31m at com.xueqiu.qa.appcrawler.Report$.runTestCase(Report.scala:77) 0m
-31m at com.xueqiu.qa.appcrawler.plugin.ReportPlugin.generateReport(ReportPlugin.scala:46) 0m
-31m at com.xueqiu.qa.appcrawler.plugin.ReportPlugin.afterElementAction(ReportPlugin.scala:39) 0m
-31m at com.xueqiu.qa.appcrawler.Crawler$$anonfun$afterElementAction$2.apply(Crawler.scala:616) 0m
-31m at com.xueqiu.qa.appcrawler.Crawler$$anonfun$afterElementAction$2.apply(Crawler.scala:616) 0m
-31m at scala.collection.immutable.List.foreach(List.scala:381) 0m
-31m at scala.collection.generic.TraversableForwarder$class.foreach(TraversableForwarder.scala:35) 0m
-31m at scala.collection.mutable.ListBuffer.foreach(ListBuffer.scala:45) 0m
-31m at com.xueqiu.qa.appcrawler.Crawler.afterElementAction(Crawler.scala:616) 0m
-31m at com.xueqiu.qa.appcrawler.Crawler.crawl(Crawler.scala:787) 0m
-31m at com.xueqiu.qa.appcrawler.Crawler$$anonfun$1.apply$mcV$sp(Crawler.scala:145) 0m
-31m at com.xueqiu.qa.appcrawler.Crawler$$anonfun$1.apply(Crawler.scala:145) 0m
-31m at com.xueqiu.qa.appcrawler.Crawler$$anonfun$1.apply(Crawler.scala:145) 0m
-31m at scala.util.Try$.apply(Try.scala:192) 0m
-31m at com.xueqiu.qa.appcrawler.Crawler.start(Crawler.scala:145) 0m
-31m at com.xueqiu.qa.appcrawler.AppCrawler$.startCrawl(AppCrawler.scala:313) 0m
-31m at com.xueqiu.qa.appcrawler.AppCrawler$.main(AppCrawler.scala:303) 0m
-31m at com.xueqiu.qa.appcrawler.AppCrawler.main(AppCrawler.scala) 0m
-31m + 0m
-31m0m
-31m0m
-31m
0m
-31m

after clicked

0m
-31m0m
-31m 0m
-32mcom.xxxxxx-BabelActivity:0m
-32m- clickedIndex=22 xpath=//
[@class=\"android.widget.RelativeLayout\" and @index=\"0\"]/[@class=\"android.widget.RelativeLayout\" and @index=\"0\"]/[@resource-i-d=\"com.xxxxxx:id/fp\"]/[@class=\"android.widget.ImageView\" and @index=\"1\"] 0m
-32m + 0m
-32m0m
-32m0m
-32m
0m
-32m

after clicked

0m
-32m0m
-32m 0m
-32mcom.xxxxxx-MainActivity:0m
-32m- clickedIndex=7 xpath=//
[@class=\"android.widget.FrameLayout\" and @index=\"0\"]/[@resource-id=\"com.xxxxxx:id/qj\"]/[@class=\"android.widget.FrameLayout\" and @index=\"0\"]/[@resource-id=\"com.xxxxxx:id/aiw\"] 0m
-32m + 0m
-32m0m
-32m0m
-32m
0m
-32m

after clicked

0m
-32m0m
32m 0m
-32m- clickedIndex=8 xpath=//
[@resource-id=\"android:id/content\"]/[@resource-id=\"com.xxxxxx:id/k_\"]/[@class=\"android.widget.FrameLayout\" and @index=\"0\"]/*[@resource-id=\"com.xxxxxx:id/c2a\"] 0m
-32m + 0m
-32m0m
-32m0m
-32m
0m
-32m

after clicked

0m
-32m0m
-32m 0m
-36mRun completed in 298 milliseconds.0m
-36mTotal number of tests run: 210m
-36mSuites: completed 10, aborted 00m
-36mTests: succeeded 20, failed 1, canceled 0, ignored 0, pending 00m
-31m
* 1 TEST FAILED ***0m
-2017-10-31 10:36:48 INFO [Crawler.crawl.691]
共收到 3 条回复 时间 点赞
潇洒ˇ瑶爷 关闭了讨论 10月30日 17:57
潇洒ˇ瑶爷 重新开启了讨论 10月30日 18:04

你把 appcrawler.log 贴出来吧。从 index = 22 以后的内容贴出来。估计是获取 page source 失败。看看 appium 有没有报错

已经贴出来了,appium 没有报错,但是被测 app 会重启,然后会重新安装 appium.setting.apk

用 2.1.2 版本去跑吧,你的版本太低了. 跑完后把结果目录下的 appcrawler.log 发给我. 内容太多了, 直接进 qq 群发给我吧

需要 登录 后方可回复, 如果你还没有账号请点击这里 注册