杭州线下第一期_20180722-AppCrawler 作业

内容

测试公司的App(如果公司没有App,就随便找一个喜欢的App)

配置文件中需要包含的内容

saveScreen设置为true

  • testease中完成App的登录部分
  • triggerActions: OK 继续
  • selectedList, firstList 指定要遍历的内容

运行一段时间后,连续两次CTRL+C结束掉测试。
打开index.html截图,回帖

下面的内容供参考

---
pluginList:
- "com.testerhome.appcrawler.plugin.TagLimitPlugin"
logLevel: "TRACE"
saveScreen: true
reportTitle: "Music"
screenshotTimeout: 20
currentDriver: "Android" # Or iOS
tagLimitMax: 3
tagLimit: []
showCancel: false
maxTime: 10800 # 3h
resultDir: "Report"
devices:
- platformName: ""
  platformVersion: "9.2"
  deviceName: "iPhone 6"
capability:
  appActivity: ""
  appium: "http://127.0.0.1:4723/wd/hub"
  autoLaunch: "true"
  noReset: true
  dontStopAppOnReset: true
  app: ""
  appPackage: ""
  fullReset: "false"
androidCapability:
  app: ""
  appPackage: "com.netease.cloudmusic"
  appActivity: ".activity.LoadingActivity"
  unicodeKeyboard: true
  resetKeyboard: true
iosCapability:
  app: ""
  bundleId: ""
  autoAcceptAlerts: "true"
xpathAttributes:
- "name"
- "label"
- "value"
- "resource-id"
- "content-desc"
- "index"
- "text"
defineUrl: []
baseUrl: []
appWhiteList: []
maxDepth: 6
headFirst: true
enterWebView: true
urlBlackList: []
urlWhiteList: []
defaultBackAction: []
backButton: []
firstList:
- 推荐
selectedList:
- //*[@content-desc="我的音乐"]
- //*[@content-desc="我的推荐"]
- //*[@content-desc="我的视频"]
- //*[@resource-id="com.netease.cloudmusic:id/adv"]/android.widget.LinearLayout[position()<5]
- //android.widget.TextView[@text]
# - "//*[contains(name(), 'Text')]"
# - "//*[contains(name(), 'Image')]"
# - "//*[contains(name(), 'Button')]"
# - "//*[contains(name(), 'CheckBox')]"
lastList:
- 我的音乐
- 我的推荐
- 我的视频
blackList:
- ".*[0-9]{2}.*"
triggerActions:
- xpath: 跳过
  action: click
autoCrawl: true
assert:
  name: "TesterHome AppCrawler"
  steps: []
testcase:
  name: "TesterHome AppCrawler"
  steps: []
    #- xpath: 立即体验
    #  action: click
    #- xpath: //*[@content-desc="抽屉菜单"]
      #action: click
    #- xpath: 立即登录
      #action: click
    #- xpath: //*[@resource-id="com.netease.cloudmusic:id/abi"]
      #action: click
    #- xpath: 请输入邮箱
      #action: 18511878092@163.com
    #- xpath: 请输入密码
      #action: 12345678
    #- xpath: 登录
      #action: click
beforeElementAction: []
afterElementAction: []
afterUrlFinished: []
monkeyEvents: []
monkeyRunTimeSeconds: 30

关闭