AppCrawler 对于报告解读方式以及相关问题的请教

战 神 · 2017年11月28日 · 最后由 战 神 回复于 2017年11月29日 · 1968 次阅读

问题:报告中没有 Success case,全都是 Fail 与 cancel,请问下这个报告是配置文件哪里有问题么?不太理解这个报告应该如何解读,希望大神能够指点一二
配置文件如下:

logLevel: "TRACE"
reportTitle: "TestBodyPlusApp"
saveScreen: false
screenshotTimeout: 15
currentDriver: "android"
showCancel: true
tagLimitMax: 5
tagLimit:
- xpath: //*[../*[@selected='true']]
  count: 12
maxTime: 10800
resultDir: ""
capability:
  newCommandTimeout: 120
  launchTimeout: 120000
  platformVersion: ""
  platformName: "Android"
  autoWebview: "false"
  autoLaunch: "true"
  noReset: "true"
  androidInstallTimeout: 180000
androidCapability:
  deviceName: "0715f7bdaaec1938"
  appPackage: "cc.bodyplus"
  appActivity: ".mvp.view.login.activity.SplashActivity"
  dontStopAppOnReset: true
  app: "C:/Users/Administrator/cc.bodyplus.v3.6.0.apkIdeaProjects/apptest/apps/cc.bodyplus.v3.6.0.apk"
  appium: "http://127.0.0.1:4723/wd/hub"
#  automationName: uiautomator2
  automationName: uiautomator2
  reuse: 3
#  nativeWebScreenshot: "true"
defineUrl:
- //*[@selected='true' and contains(name(), 'TextView')]/@text
#- //*[contains(@resource-id, 'title')]/@text
appWhiteList:
- android
- com.shafa.market
baseUrl:
- ".*MainActivity"
- ".*SNBHomeView.*"
maxDepth: 20
headFirst: true
enterWebView: true
urlBlackList:
- .*OutdoorSummaryMap.*
- .*\\.base\\.Container.*
#urlWhiteList:
#- ".*Main.*"
backButton:
- //*[contains(@resource-id, "left_button") and @clickable='true']
- //*[@resource-id='cc.bodyplus:id/base_title_left_imageButton']
- //*[@resource-id='cc.bodyplus:id/image_pause']
- //*[@resource-id='cc.bodyplus:id/linear_over']
#defaultBackAction:
#- import sys.process._;
#- Thread.sleep(5000)
#- val name=Seq("adb", "shell", "dumpsys window windows | grep mCurrentFocus").!!.split(" ")(4).split("/")(0)
#- println(s"kill package ${name}")
#- Seq("adb", "shell", s"am force-stop ${name}").!!
#firstList:
#- //*[contains(@resource-id, "layout_picker_view_container"]
selectedList:
#android非空标签
- //*[@clickable='true']
- //*[@clickable='true']//*[contains(name(), 'Text') and string-length(@text)>0 and string-length(@text)<10 ]
#通用的button和image
- //*[@clickable='true']//*[contains(name(), 'Button')]
- //*[@clickable='true']//*[contains(name(), 'Image')]
#todo:如果多个规则都包含相同控件, 如何排序
#处于选中状态的同级控件最后点击
lastList:
- //*[../*[@selected='true']]
- //*[../../*/*[@selected='true']]
- //*[../../*/*[@selected='true'] and contains(@resource-id, 'tab_')]
- //*[contains(name(), "HorizontalScrollView")]
- //*[@resource-id='cc.bodyplus:id/base_title_left_imageButton']
blackList:
- ".*\\.[0-9].*"
- ".*[0-9]{2,}.*"
- //*[contains(@resource-id, "wrapper_in_custom_title_bar")]//*[contains(@resource-id, "right_button")]
- //*[contains(@resource-id, "share")]
- //*[contains(@text, "开始第")]
- //*[contains(@resource-id, "lock")]
- //*[contains(@text, "绑定您的智能服装")]
- //*[@resource-id='cc.bodyplus:id/view_wechat']
- //*[@resource-id='cc.bodyplus:id/view_qq']
- //*[@resource-id='cc.bodyplus:id/view_microblog']
- //*[@resource-id='cc.bodyplus:id/image_next_train']
- //*[@resource-id='cc.bodyplus:id/progress_speed']
- //*[@resource-id='cc.bodyplus:id/image_music']
- //*[@resource-id='cc.bodyplus:id/image_bg']
- //*[@resource-id='cc.bodyplus:id/linear_explain']

triggerActions: # 这里可以设置触发器
- action: "13728963515"
  xpath: "//*[@resource-id='cc.bodyplus:id/edit_login_phone']"
  times: 1
- action: "fzc8802653"
  xpath: "//*[@resource-id='cc.bodyplus:id/edit_login_password']"
  times: 1
- action: "click"
  xpath: "//*[@resource-id='cc.bodyplus:id/tv_login']"
  times: 1
startupActions: # 最开始做的从操作
- swipe("left")
- swipe("left")
- swipe("left")
- swipe("left")
- println(driver)
asserts:

,报告情况如下:

共收到 1 条回复 时间 点赞

这个问题是由于 yml 文件内 assert: 内容为空导致的,删除 assert:标签即可,其他标签如果无内容也建议删除,会出现空指针报错的情况

战 神 关闭了讨论 11月29日 18:16
需要 登录 后方可回复, 如果你还没有账号请点击这里 注册