appCrawler --capability xxx可正常启动,运行配置文件appCrawler -c demo.yml时报错

`报错信息如下
D:\software\python-learning>java -jar appcrawler-2.4.0-jar-with-dependencies.jar -c demo.yml
2021-03-16 16:41:09 INFO [AppCrawler$.86.main]

AppCrawler 2.4.0 [霍格沃兹测试学院特别纪念版]
Appium 1.8.1 Java8 tested
app爬虫, 用于自动遍历测试. 支持Android和iOS, 支持真机和模拟器
项目地址: https://github.com/seveniruby/AppCrawler
移动测试技术交流: https://testerhome.com
联络作者: seveniruby@testerhome.com (思寒)
致谢: 晓光 泉龙 杨榕 恒温 mikezhou yaming116 沐木


2021-03-16 16:41:09 INFO [AppCrawler$.203.parseParams] Find Conf D:\software\python-learning\demo.yml
Exception in thread “main” java.nio.charset.MalformedInputException: Input length = 1
at java.nio.charset.CoderResult.throwException(Unknown Source)
at sun.nio.cs.StreamDecoder.implRead(Unknown Source)
at sun.nio.cs.StreamDecoder.read(Unknown Source)
at java.io.InputStreamReader.read(Unknown Source)
at java.io.BufferedReader.fill(Unknown Source)
at java.io.BufferedReader.readLine(Unknown Source)
at java.io.BufferedReader.readLine(Unknown Source)
at scala.io.BufferedSource$BufferedLineIterator.hasNext(BufferedSource.scala:70)
at scala.collection.Iterator.foreach(Iterator.scala:944)
at scala.collection.Iterator.foreach$(Iterator.scala:944)
at scala.collection.AbstractIterator.foreach(Iterator.scala:1432)
at scala.collection.TraversableOnce.addString(TraversableOnce.scala:357)
at scala.collection.TraversableOnce.addString$(TraversableOnce.scala:353)
at scala.collection.AbstractIterator.addString(Iterator.scala:1432)
at scala.collection.TraversableOnce.mkString(TraversableOnce.scala:323)
at scala.collection.TraversableOnce.mkString$(TraversableOnce.scala:322)
at scala.collection.AbstractIterator.mkString(Iterator.scala:1432)
at scala.collection.TraversableOnce.mkString(TraversableOnce.scala:325)
at scala.collection.TraversableOnce.mkString$(TraversableOnce.scala:325)
at scala.collection.AbstractIterator.mkString(Iterator.scala:1432)
at com.testerhome.appcrawler.CrawlerConf.load(CrawlerConf.scala:189)
at com.testerhome.appcrawler.AppCrawler$.parseParams(AppCrawler.scala:204)
at com.testerhome.appcrawler.AppCrawler$.main(AppCrawler.scala:91)
at com.testerhome.appcrawler.AppCrawler.main(AppCrawler.scala)

配置文件demo.yml如下

pluginList:
saveScreen: true
reportTitle: “”
resultDir: “20210316162031”
waitLoading: 500
waitLaunch: 6000
showCancel: true
maxTime: 10800
maxDepth: 10
capability:
noReset: “true”
fullReset: “false”
appium: “http://127.0.0.1:4723/wd/hub
appPackage:“xxx.magic.series”
appActivity:“xxx.show.core.ui.EvsLauncherActivity”
testcase:
name: “TesterHome AppCrawler”
steps:

  • xpath: “//*[@resource-id=‘xxx.magic.series:id/cv_recipe’]”

capability可正常运行代表包名等信息没有错,运行配置文件报错信息显示unknown source代表什么意思呢

可能是自动生成的demo文件的编码格式不对,改成UTF-8试试

是的,多谢,我将demo转ASCI后再转为UTF-8可正常运行。

关闭