Skip to main content

快速启动-android稳定性测试

Project description

###快速启动-android稳定性测试


  • 前置条件:需安装adb环境、需安装adb环境、需安装adb环境,重要事情说三遍

  • 简介: 结合字节跳动提供的开源工具Fastbot_android, 进行封装了基础版的稳定性测试, 只需要数据线连接电脑,并确定在cmd中输入adb devices,看到了手机设备号,即可运行命令。

  • 命令参数
必选参数:
  startproject              创建工程目录
  
  run                       运行
  
    package 包名,必须输入,不然会抛出异常
    
    -m 10 是设置分钟,置默认为5分钟
    
    -t 500 是设置点击事件,默认设置为500
    
    -log 是捕获异常日志,布尔值,默认是true
    
    -module 是获取自定义文件中的模块名称

  • 基础教程
  1. 新建一个工程目录testProject,在Terminal中输入命令创建脚手架:
PS E:\testProject> py -m dfwsgroup startproject demo          
2022-02-23 11:27:43.369 | INFO     | dfwsgroup.scaffold:create_folder:29 - 创建文件夹:demo
2022-02-23 11:27:43.371 | INFO     | dfwsgroup.scaffold:create_file:38 - 创建文件:demo\__init__.py
2022-02-23 11:27:43.372 | INFO     | dfwsgroup.scaffold:create_folder:29 - 创建文件夹:demo\modules
2022-02-23 11:27:43.373 | INFO     | dfwsgroup.scaffold:create_file:38 - 创建文件:demo\modules\dfwsgroup.json
2022-02-23 11:27:43.374 | INFO     | dfwsgroup.scaffold:create_file:38 - 创建文件:demo\debugfeng.py 
  1. Terminal中输入运行命令

默认是运行 5 分钟点击 500 下

PS E:\testProject> py -m dfwsgroup run "包名" -module "login"(login是dfwsgroup.json文件中的模块名)

默认是运行 10 分钟点击 1000 下

PS E:\testProject> py -m dfwsgroup run "包名" -m 10 -t 100 -module "login"(login是dfwsgroup.json文件中的模块名)

默认是运行 5 分钟点击 500 下,并不要记录日志

PS E:\testProject> py -m dfwsgroup run "包名" -module login -l flase
  1. 设置自定义文件dfwsgroup.json文件

json文件固定格式:

{
  "login": [
    {
      "prob": 1,
      "activity": "xz.act.app_v4.account.LoginActivityV4",
      "times": 1,
      "actions": [
        {
          "xpath": "//*[@resource-id='xz.act:id/tv_account']",
          "action": "CLICK",
          "throttle": 2000
        }
      ]
    },
    {
      "prob": 1,
      "activity": "xz.act.app_v4.account.AccountLoginActivityV4",
      "times": 1,
      "actions": [
        {
          "xpath": "//*[@resource-id='xz.act:id/et_select']",
          "action": "CLICK",
          "throttle": 2000
        },
        {
          "xpath": "//*[@resource-id='xz.act:id/et_search']",
          "action": "CLICK",
          "text": "*测试酒店",
          "clearText": false,
          "throttle": 2000
        },
        {
          "xpath": "//*[@resource-id='xz.act:id/group_name']",
          "action": "CLICK",
          "throttle": 2000
        }
      ]
    }
  ]
}

|

后续会在增加黑白名单操作,敬请期待。。。



###严正声明

  • 作者只提供工具使用,当用户使用其他用途时,对用户或者他人造成任何形式的损失和伤害,该工具不承担任何责任。

  • 本协议的一切解释权与修改权归本工具所有。

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

dfwsgroup-1.0.8.tar.gz (511.4 kB view details)

Uploaded Source

Built Distribution

dfwsgroup-1.0.8-py3-none-any.whl (512.5 kB view details)

Uploaded Python 3

File details

Details for the file dfwsgroup-1.0.8.tar.gz.

File metadata

  • Download URL: dfwsgroup-1.0.8.tar.gz
  • Upload date:
  • Size: 511.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.26.0 requests-toolbelt/0.9.1 urllib3/1.26.7 tqdm/4.62.3 importlib-metadata/4.11.0 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.10.1

File hashes

Hashes for dfwsgroup-1.0.8.tar.gz
Algorithm Hash digest
SHA256 21fe0f482e7f8522f7025bca7234d2f053132c4d74efa48298c70aebe09cddd9
MD5 b8ae80ad198069c6d6812118f9c70769
BLAKE2b-256 a83233d975372c72d679d176e251b40520124e6aa674df5081caae66022ce041

See more details on using hashes here.

File details

Details for the file dfwsgroup-1.0.8-py3-none-any.whl.

File metadata

  • Download URL: dfwsgroup-1.0.8-py3-none-any.whl
  • Upload date:
  • Size: 512.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.26.0 requests-toolbelt/0.9.1 urllib3/1.26.7 tqdm/4.62.3 importlib-metadata/4.11.0 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.10.1

File hashes

Hashes for dfwsgroup-1.0.8-py3-none-any.whl
Algorithm Hash digest
SHA256 7eda129b00ae90ae68dab1f726444ba9d39f74d9b69ca6174a688a2cad1b726f
MD5 305959ec996869547eacc1e737d8ac7b
BLAKE2b-256 d10e4637713b8855b80915442ec9ce8c41d17602892fa6c7832128f5564f6e1d

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page