线上班第六期_自动遍历测试基础__20180512

自动遍历基础

项目地址:https://github.com/seveniruby/AppCrawler
下载地址:http://shell.testing-studio.com:8081/download/appcrawler-2.1.3.jar

adb shell dumpsys activity activities
java -jar appcrawler-2.1.3.jar --capability "appPackage=com.xueqiu.android,appActivity=.view.WelcomeActivityAlias" -o /tmp/xueqiu/3
java -jar appcrawler-2.1.3.jar --capability "appPackage=com.xueqiu.android,appActivity=.view.WelcomeActivityAlias,noReset=false" -o /tmp/xueqiu/4
java -jar <appcrawler.jar路径> --demo
java -jar <appcrawler.jar路径> \\
-c example.yml  \\
--capability "appPackage=com.xueqiu.android,appActivity=.view.WelcomeActivityAlias" \\
-o /tmp/xueqiu/1

配置文件示例


---
pluginList:
- "com.testerhome.appcrawler.plugin.TagLimitPlugin"
logLevel: "TRACE"
saveScreen: true
reportTitle: "TesterHome线上班第六期演示"
screenshotTimeout: 20
currentDriver: "Android"
tagLimitMax: 3
tagLimit: []
showCancel: false
maxTime: 10800
resultDir: "Android_20180512205148"
devices:
- platformName: ""
  platformVersion: "9.2"
  deviceName: "iPhone 6"
capability:
  appActivity: ""
  appium: "http://127.0.0.1:4723/wd/hub"
  autoLaunch: "true"
  noReset: "true"
  app: ""
  appPackage: ""
  fullReset: "false"
androidCapability:
  app: ""
  appPackage: ""
  appActivity: ""
iosCapability:
  app: ""
  bundleId: ""
  autoAcceptAlerts: "true"
xpathAttributes:
- "name"
- "label"
- "value"
- "resource-id"
- "content-desc"
- "index"
- "text"
defineUrl: []
baseUrl: []
appWhiteList: []
maxDepth: 2
headFirst: true
enterWebView: true
urlBlackList: []
urlWhiteList: []
defaultBackAction: []
backButton: []

firstList:
- 实盘大赛
- 专题精华
- 组合风云榜

selectedList:
- "//*[contains(name(), 'Text')]"

lastList:
- 问答广场
- 蛋卷基金
- 沪深
- 私募工场

blackList:
- ".*[0-9]{2}.*"
- //*[contains(@resource-id, 'today_topic_container')]//*

triggerActions:
- xpath: 请输入手机号
  action: 15600534760
  times: 1
- xpath: login_password
  action: hys12345678
  times: 1
- xpath: button_next
  action: click
  times: 1

autoCrawl: true
assert:
  name: "TesterHome AppCrawler"
  steps: []

testcase:
  name: "TesterHome AppCrawler"
  steps:
  - xpath: 登录
    action: click

beforeElementAction: []
afterElementAction: []
afterUrlFinished: []
monkeyEvents: []
monkeyRunTimeSeconds: 30

作业

遍历自己公司的app,贴下index.html里面的报告截图。遍历的越多越好。比如