關於 AppCrawler 執行過程中的幾個小問題

游戏人间發表於2020-07-22

最近在研究 AppCrawler,但是在執行過程中發現了幾個問題,麻煩大佬們幫忙解答一下~

1.執行過程中會跳到其他 APP
能否讓 AppCrawler 僅在指定 APP 內操作?

2.執行了幾十條後,APP 介面就不動了,一直停留在某個頁面
結束執行,生成報告後,在報告處也沒看出來哪裡報錯了

3.怎麼才能看到它失敗呢?
雖然我現在沒有寫 testcase,但是也應該可以檢測出來 crash 吧?即使我後臺殺死 APP,檢視報告還都是正常的,不知道是怎麼回事

config 檔案內容為:
---
pluginList: []
saveScreen: true
reportTitle: "AppCrawler自動遍歷測試報告"
resultDir: ""
waitLoading: 500
waitLaunch: 6000
showCancel: true
maxTime: 10800
maxDepth: 5
capability:
  noReset: "true"
  fullReset: "false"
  appium: "http://127.0.0.1:4723/wd/hub"
  appPackage: "*****"
  appActivity: "activity.StartUpActivity"
  automationName: uiautomator2
  autoGrantPermissions: true
  dontStopAppOnReset: true
testcase:
  name: "TesterHome AppCrawler"
  steps:
  - given: []
    when: null
    then: []
    xpath: "/*"
    action: "Thread.sleep(5000)"
    actions: []
    times: 0
selectedList:
- {xpath: "//*[@clickable='true']", action: click }
firstList: 
- { xpath: "//*[contains(@text, '運動')]", action: click }
lastList:
- { xpath: "//*[contains(@text, '課程')]", action: click }
- { xpath: "//*[contains(@text, '社群')]", action: click }
- { xpath: "//*[contains(@text, '發現')]", action: click }
- { xpath: "//*[contains(@text, '我的')]", action: click }
backButton: []
triggerActions:
- xpath: et_username
  action: ***
  times: 1
- xpath: et_password
  action: ***
  times: 1
xpathAttributes:
- "name"
- "label"
- "value"
- "resource-id"
- "content-desc"
- "instance"
- "text"
sortByAttribute:
- "depth"
- "list"
- "selected"
findBy: "default"
defineUrl: []
baseUrl: []
appWhiteList: []
urlBlackList: []
urlWhiteList: []
blackList:
- given: []
  when: null
  then: []
  xpath: ".*[0-9]{2}.*"
  action: null
  actions: []
  times: 0
beforeRestart: []
beforeElement:
- given: []
  when: null
  then: []
  xpath: "/*"
  action: "Thread.sleep(500)"
  actions: []
  times: 0
afterElement: []
afterPage: []
afterPageMax: 5
tagLimitMax: 3
tagLimit:
- {xpath: "//*[contains(@class, 'List')]//*", times: 1}
assertGlobal: []

相關文章