测试人社区

appcrawler执行Demo报错无法执行

appcrawler执行自带Demo.yml报错,appium无反应。
ps:Demo未改动,–demo下来直接执行的-c demo.yml
appcrawler报错信息:

2020-05-27 14:51:25 INFO [AppCrawler$.203.parseParams] Find Conf /Users/v_liuzhen01/demo.yml
2020-05-27 14:51:26 INFO [AppCrawler$.226.parseParams] use appium in the config file http://127.0.0.1:4723/wd/hub
2020-05-27 14:51:26 INFO [AppCrawler$.230.parseParams] appium address = Some(http://127.0.0.1:4723/wd/hub)
2020-05-27 14:51:26 INFO [AppCrawler$.238.parseParams] use conf in config file
2020-05-27 14:51:26 INFO [AppCrawler$.242.parseParams] result directory = 20200527144132
2020-05-27 14:51:26 INFO [Crawler.130.start] set xpath attribute with List(name, label, value, resource-id, content-desc, instance, text)
2020-05-27 14:51:26 INFO [Crawler.135.start] set xpath
2020-05-27 14:51:26 INFO [Crawler.89.$anonfun$loadPlugins$2] com.testerhome.appcrawler.plugin.TagLimitPlugin@4dba773d
2020-05-27 14:51:26 INFO [Crawler.89.$anonfun$loadPlugins$2] com.testerhome.appcrawler.plugin.ReportPlugin@eac3a26
2020-05-27 14:51:26 INFO [Crawler.89.$anonfun$loadPlugins$2] com.testerhome.appcrawler.plugin.FreeMind@53cf9c99
2020-05-27 14:51:26 INFO [TagLimitPlugin.19.init] com.testerhome.appcrawler.plugin.TagLimitPlugin init
2020-05-27 14:51:26 INFO [ReportPlugin.19.init] com.testerhome.appcrawler.plugin.ReportPlugin init
2020-05-27 14:51:26 INFO [FreeMind.19.init] com.testerhome.appcrawler.plugin.FreeMind init
2020-05-27 14:51:26 INFO [ReportPlugin.21.start] reportPath=/Users/v_liuzhen01/20200527144132
2020-05-27 14:51:26 INFO [Crawler.138.start] prepare setup Appium
2020-05-27 14:51:26 INFO [Crawler.250.setupAppium] afterPageMax=2
2020-05-27 14:51:28 INFO [Crawler.273.setupAppium] use AppiumClient
2020-05-27 14:51:28 INFO [Crawler.274.setupAppium] Map(noReset -> true, fullReset -> false, appium -> http://127.0.0.1:4723/wd/hub)
Exception in thread "main" scala.MatchError: [app, appium, deviceName, fullReset, noReset] (of class java.util.Collections$UnmodifiableSet)
	at com.testerhome.appcrawler.driver.AppiumClient.appium(AppiumClient.scala:94)
	at com.testerhome.appcrawler.driver.AppiumClient.<init>(AppiumClient.scala:40)
	at com.testerhome.appcrawler.Crawler.setupAppium(Crawler.scala:277)
	at com.testerhome.appcrawler.Crawler.start(Crawler.scala:139)
	at com.testerhome.appcrawler.AppCrawler$.startCrawl(AppCrawler.scala:322)
	at com.testerhome.appcrawler.AppCrawler$.parseParams(AppCrawler.scala:290)
	at com.testerhome.appcrawler.AppCrawler$.main(AppCrawler.scala:91)
	at com.testerhome.appcrawler.AppCrawler.main(AppCrawler.scala)
appcrawler执行:
java -jar appcrawler-2.4.0-jar-with-dependencies.jar --conf demo.yml
无问题

环境:java1.8、appium1.16、安卓6、AppCrawler 2.4.0

我试了一下 ,如果你在配置文件中不填写appPackage的话就会报你这个错误 至于你执行的时候是用-c还是–conf没发现有区别

请问是有哪里配置错误了吗?capability设置在pycharm中可以正确运行的
demo.yml 配置如下:

执行报错:

demo.yml下没有配置其他条件
运行环境
mumu模拟器 ,Android 6
java 1.8
appium 1.15.1
AppCrawler 2.4

默认生成的配置里有testcase自动化的示例部分,删除testcase部门就可以了。或者把里面的steps设置为

现在运行都正常了,谢谢老师解答~