问答 使用 AppCrawler 测试报告中有好多状态是 Canceled,是什么意思呢?

木头 · 2018年06月21日 · 最后由 木头 回复于 2018年06月21日 · 2431 次阅读

@seveniruby 打扰思寒大神了
如题所说,下面是某一个 canceled 的日志信息:

clickedIndex=-1 action=Ready xpath=//[@resource-id=\"com.vipkid.app:id/home_tab_layout\" and @index=\"1\"]/[@resource-id=\"com.vipkid.app:id/home_tabs\" and @index=\"1\"]/[@index=\"2\"]/[@resource-id=\"com.vipkid.app:id/mTabImg\" and @index=\"0\"] !!! CANCELED !!!
(Hide Details)
Message: Ready not click
Line: (TemplateTestCase.scala:100)
Exception: org.scalatest.exceptions.TestCanceledException
org.scalatest.Assertions.newTestCanceledException(Assertions.scala:531)
org.scalatest.Assertions.newTestCanceledException$(Assertions.scala:530)
org.scalatest.FunSuite.newTestCanceledException(FunSuite.scala:1560)
org.scalatest.Assertions.cancel(Assertions.scala:1141)
org.scalatest.Assertions.cancel$(Assertions.scala:1137)
org.scalatest.FunSuite.cancel(FunSuite.scala:1560)
com.testerhome.appcrawler.TemplateTestCase.$anonfun$addTestCase$8(TemplateTestCase.scala:100)
org.scalatest.OutcomeOf.outcomeOf(OutcomeOf.scala:85)
org.scalatest.OutcomeOf.outcomeOf$(OutcomeOf.scala:83)
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.withFixture(TestSuite.scala:196)
org.scalatest.TestSuite.withFixture$(TestSuite.scala:195)
org.scalatest.FunSuite.withFixture(FunSuite.scala:1560)
org.scalatest.FunSuiteLike.invokeWithFixture$1(FunSuiteLike.scala:184)
org.scalatest.FunSuiteLike.$anonfun$runTest$1(FunSuiteLike.scala:196)
org.scalatest.SuperEngine.runTestImpl(Engine.scala:289)
org.scalatest.FunSuiteLike.runTest(FunSuiteLike.scala:196)
org.scalatest.FunSuiteLike.runTest$(FunSuiteLike.scala:178)
org.scalatest.FunSuite.runTest(FunSuite.scala:1560)
org.scalatest.FunSuiteLike.$anonfun$runTests$1(FunSuiteLike.scala:229)
org.scalatest.SuperEngine.$anonfun$runTestsInBranch$1(Engine.scala:396)
scala.collection.immutable.List.foreach(List.scala:389)
org.scalatest.SuperEngine.traverseSubNodes$1(Engine.scala:384)
org.scalatest.SuperEngine.runTestsInBranch(Engine.scala:379)
org.scalatest.SuperEngine.runTestsImpl(Engine.scala:461)
org.scalatest.FunSuiteLike.runTests(FunSuiteLike.scala:229)
org.scalatest.FunSuiteLike.runTests$(FunSuiteLike.scala:228)
org.scalatest.FunSuite.runTests(FunSuite.scala:1560)
org.scalatest.Suite.run(Suite.scala:1147)
org.scalatest.Suite.run$(Suite.scala:1129)
org.scalatest.FunSuite.org$scalatest$FunSuiteLike$$super$run(FunSuite.scala:1560)
org.scalatest.FunSuiteLike.$anonfun$run$1(FunSuiteLike.scala:233)
org.scalatest.SuperEngine.runImpl(Engine.scala:521)
org.scalatest.FunSuiteLike.run(FunSuiteLike.scala:233)
org.scalatest.FunSuiteLike.run$(FunSuiteLike.scala:232)
com.testerhome.appcrawler.TemplateTestCase.org$scalatest$BeforeAndAfterAllConfigMap$$super$run(TemplateTestCase.scala:13)
org.scalatest.BeforeAndAfterAllConfigMap.liftedTree1$1(BeforeAndAfterAllConfigMap.scala:248)
org.scalatest.BeforeAndAfterAllConfigMap.run(BeforeAndAfterAllConfigMap.scala:245)
org.scalatest.BeforeAndAfterAllConfigMap.run$(BeforeAndAfterAllConfigMap.scala:242)
com.testerhome.appcrawler.TemplateTestCase.run(TemplateTestCase.scala:13)
org.scalatest.Suite.callExecuteOnSuite$1(Suite.scala:1210)
org.scalatest.Suite.$anonfun$runNestedSuites$1(Suite.scala:1257)
scala.collection.IndexedSeqOptimized.foreach(IndexedSeqOptimized.scala:32)
scala.collection.IndexedSeqOptimized.foreach$(IndexedSeqOptimized.scala:29)
scala.collection.mutable.ArrayOps$ofRef.foreach(ArrayOps.scala:191)
org.scalatest.Suite.runNestedSuites(Suite.scala:1255)
org.scalatest.Suite.runNestedSuites$(Suite.scala:1189)
org.scalatest.tools.DiscoverySuite.runNestedSuites(DiscoverySuite.scala:30)
org.scalatest.Suite.run(Suite.scala:1144)
org.scalatest.Suite.run$(Suite.scala:1129)
org.scalatest.tools.DiscoverySuite.run(DiscoverySuite.scala:30)
org.scalatest.tools.SuiteRunner.run(SuiteRunner.scala:45)
org.scalatest.tools.Runner$.$anonfun$doRunRunRunDaDoRunRun$13(Runner.scala:1340)
org.scalatest.tools.Runner$.$anonfun$doRunRunRunDaDoRunRun$13$adapted(Runner.scala:1334)
scala.collection.immutable.List.foreach(List.scala:389)
org.scalatest.tools.Runner$.doRunRunRunDaDoRunRun(Runner.scala:1334)
org.scalatest.tools.Runner$.$anonfun$runOptionallyWithPassFailReporter$24(Runner.scala:1031)
org.scalatest.tools.Runner$.$anonfun$runOptionallyWithPassFailReporter$24$adapted(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.testerhome.appcrawler.Report.runTestCase(Report.scala:64)
com.testerhome.appcrawler.Report.runTestCase$(Report.scala:40)
com.testerhome.appcrawler.Report$.runTestCase(Report.scala:77)
com.testerhome.appcrawler.plugin.ReportPlugin.generateReport(ReportPlugin.scala:47)
com.testerhome.appcrawler.plugin.ReportPlugin.stop(ReportPlugin.scala:30)
com.testerhome.appcrawler.Crawler.$anonfun$stop$2(Crawler.scala:1148)
com.testerhome.appcrawler.Crawler.$anonfun$stop$2$adapted(Crawler.scala:1148)
scala.collection.immutable.List.foreach(List.scala:389)
scala.collection.generic.TraversableForwarder.foreach(TraversableForwarder.scala:35)
scala.collection.generic.TraversableForwarder.foreach$(TraversableForwarder.scala:35)
scala.collection.mutable.ListBuffer.foreach(ListBuffer.scala:44)
com.testerhome.appcrawler.Crawler.$anonfun$stop$1(Crawler.scala:1148)
scala.runtime.java8.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.java:12)
scala.util.Try$.apply(Try.scala:209)
com.testerhome.appcrawler.Crawler.stop(Crawler.scala:1148)
com.testerhome.appcrawler.Crawler.crawl(Crawler.scala:218)
com.testerhome.appcrawler.Crawler.start(Crawler.scala:164)
com.testerhome.appcrawler.AppCrawler$.startCrawl(AppCrawler.scala:344)
com.testerhome.appcrawler.AppCrawler$.parseParams(AppCrawler.scala:312)
com.testerhome.appcrawler.AppCrawler$.main(AppCrawler.scala:92)
com.testerhome.appcrawler.AppCrawler.main(AppCrawler.scala)

如果觉得我的文章对您有用,请随意打赏。您的支持将鼓励我继续创作!
共收到 3 条回复 时间 点赞

使用的版本是 AppCrawler 2.1.3 + appium 1.7.2

是正常的,有些按钮会因为特殊情况无法遍历到。所以会给你生成到报告里。如果你不想看到,可以通过 showCancel: false 关闭掉

好的,多谢大神帮我解惑👍

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