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 fastrun startproject demo          
2022-02-23 11:27:43.369 | INFO     | fastrun.scaffold:create_folder:29 - 创建文件夹:demo
2022-02-23 11:27:43.371 | INFO     | fastrun.scaffold:create_file:38 - 创建文件:demo\__init__.py
2022-02-23 11:27:43.372 | INFO     | fastrun.scaffold:create_folder:29 - 创建文件夹:demo\modules
2022-02-23 11:27:43.373 | INFO     | fastrun.scaffold:create_file:38 - 创建文件:demo\modules\fastrun.json
2022-02-23 11:27:43.374 | INFO     | fastrun.scaffold:create_file:38 - 创建文件:demo\debugfeng.py 
  1. Terminal中输入运行命令

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

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

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

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

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

PS E:\testProject> py -m fastrun run "包名" -module login -l flase
  1. 设置自定义文件fastrun.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

fastrun-1.0.4.tar.gz (9.2 kB view details)

Uploaded Source

Built Distribution

fastrun-1.0.4-py3-none-any.whl (11.2 kB view details)

Uploaded Python 3

File details

Details for the file fastrun-1.0.4.tar.gz.

File metadata

  • Download URL: fastrun-1.0.4.tar.gz
  • Upload date:
  • Size: 9.2 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 fastrun-1.0.4.tar.gz
Algorithm Hash digest
SHA256 0ad8307b11d1427b2c674462eea0d6ec67b6474daf8f60ce53cd4978aa21c8b5
MD5 f53f0b1418f2182438aa48622b16b452
BLAKE2b-256 3a6e3432635df828a9a8318f160ea01e35622472f2b533379398fce802d8dec8

See more details on using hashes here.

File details

Details for the file fastrun-1.0.4-py3-none-any.whl.

File metadata

  • Download URL: fastrun-1.0.4-py3-none-any.whl
  • Upload date:
  • Size: 11.2 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 fastrun-1.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 6c79e8d5021490e2a0b9d1d6e8f7a7edfcc3c42fd723fc8da1908fcde4557df5
MD5 04a115a824a772dcffc3b79212e2d740
BLAKE2b-256 d3c4a40bb9d8a0f0739979f93baf1c4daf9b1933a610fd45f7b30afd4eb6f85c

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