simlpe_automation_framework
介绍
simple_automation_framework(简称:SAF)
使用最简单的模式就可以实现需要功能和测试效果,也是xiaobaiauto2的简化版
SAF继承了selenium、requests/httpx、appium、loguru、xiaobaiauto2
SAF拥有飞书机器人、钉钉机器人、企业微信机器人、禅道提单、JIRA提单、Allure报告等功能
版本注意
建议Python >= 3.9 版本
建议selenium >= 4.0 支持代码自动执行无需关注浏览器驱动问题,可以自行下载
防止某些库出现不兼容问题,导致功能不可使用
安装教程
pip[3] config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple
# 默认安装(仅核心功能)
pip[3] install xiaobaisaf
# 安装所有依赖
pip[3] install xiaobaisaf[all]
# 按需安装
pip[3] install xiaobaisaf[dev] # 开发依赖
pip[3] install xiaobaisaf[template] # 模板功能
pip[3] install xiaobaisaf[monitor] # 监控功能
pip[3] install xiaobaisaf[device] # 设备功能
pip[3] install xiaobaisaf[tools] # 工具功能
# 组合安装
pip[3] install xiaobaisaf[dev,template,monitor,device,tools]
使用说明
命令行工具 (xiaobaicmd)
xiaobaicmd 是 SAF 的命令行工具,支持子命令模式:
# 查看帮助
xiaobaicmd --help
# 简写: xiaobaicmd -h
1. 模板命令 (template/t)
创建自动化项目模板
xiaobaicmd template web # 创建 WEB 项目模板
xiaobaicmd template api # 创建 API 项目模板
xiaobaicmd template app # 创建 APP 项目模板
xiaobaicmd t web -d D:/myproject # 简写 + 指定目录
2. 监控命令 (monitor/m)
监控 Android 设备相关功能
xiaobaicmd monitor gui # GUI 监控界面
xiaobaicmd monitor cli # CLI 监控模式
xiaobaicmd monitor power # 电量监控
xiaobaicmd monitor memory # 内存监控
xiaobaicmd monitor cp # 剪贴板监控(fetch 转 requests)
xiaobaicmd m gui # 简写
3. 设备命令 (device/d)
设备界面监控
xiaobaicmd device 1 # 监控设备 1
xiaobaicmd device # 默认监控设备 1
xiaobaicmd d 2 # 简写,监控设备 2
4. 工具命令 (tools)
各类工具集合
xiaobaicmd tools dns # 更新 GitHub DNS(使用默认域名)
xiaobaicmd tools dns github.com,raw.githubusercontent.com # 更新指定域名
xiaobaicmd tools install # 打开软件管理器界面
xiaobaicmd tools curl2locust # Curl 转 Locust 的 web 服务
xiaobaicmd tools curl2locust -f req.txt # 指定 curl 文件
xiaobaicmd tools curl2locust -p 8080 # 指定端口
xiaobaicmd tools c2l -f req.txt # 简写
xiaobaicmd tools openclaw # Openclaw 工具
操作介绍
可以观看官方抖音(抖音号:xiaobaiTser)
参与贡献
更新日志
| version | info |
|---|---|
| 1.0 | 基本实现web自动化模板功能 |
| 1.1 | 修复已知BUG |
| 1.2 | 新增allure报告库及封装禅道提单接口 |
| 1.3 | 新增jira提单接口 |
| 1.4 | 新增pytest参数化样例 |
| 1.5 | 优化pytest样例内容 |
| 1.6 | 修复已知BUG |
| 1.7 | 新增基础环境检测功能 |
| 1.8 | 新增API自动化模板 |
| 1.9 | 新增xiaobaicmd -u命令 |
| 2.0 | 新增xiaobaicmd -m命令 |
| 2.1 | 新增xiaobaicmd --device命令 |
| 2.2 | 修复已知BUG |
| 2.3 | 新增实时监控Android设备耗电量 |
| 2.3.1 | 修复已知BUG |
| 2.3.2 | 修复已知BUG |
| 2.3.3 | 新增实时监控Android当前APP的内存使用率 |
| 2.3.4 | 新增xiaobaicmd -m gui效果展示 |
| 2.3.5 | 新增xiaobaicmd -u 转PO代码时xpath的表达式 |
| 2.3.6 | 新增实时监控Android当前APP的CPU使用率及FPS数据 |
| 2.3.7 | 新增识别滑块验证码破解 |
| 2.3.8 | 优化识别滑块验证码破解 |
| 2.3.9 | 新增解析DNS并刷新DNS缓存,数据保存HOSTS |
| 2.4 | 修复已知BUG |
| 2.4.1 | 优化DNS解析效果 |
| 2.4.2 | 优化自动生成代码 |
| 2.4.3 | 优化 |
| 2.4.3.1 | 优化 |
| 2.4.3.2 | 优化 |
| 2.5.0 | 添加xiaobaimanager命令 |
| 2.5.1 | 优化xiaobai |
| 2.5.1 | 新增xiaobaifinder |
| 3.0.0 | 新增xiaobaidevice、xiaobaidevice2、xiaobaicmd -m cp |
| 3.0.1 | xiaobaicmd -m cp 新增【Ctrl + S】 |
| 3.0.2 | xiaobaicmd -t api 替换模板 |
| 3.0.3 | xiaobaicmd -t api 新增界面操作替换模板 |
| 3.0.4 | 优化生成接口自动化模板 |
| 3.1.0 | 优化 |
| 3.1.1 | Fix |
| 3.1.2 | Fix |
| 3.1.6 | Fix |
| 3.1.7 | Fix |
| 3.1.8 | 修复xiaobaidevice2功能不可用 |
| 3.1.9 | 精简依赖库 |
| 3.2.0 | 新增xiaobaipom |
| 3.2.1 | 优化xiaobaipom |
| 3.2.2 | 优化xiaobaipom |
| 3.2.3 | 优化xiaobaipom |
| 3.2.5 | 优化 |
| 3.2.6 | 优化 |
| 3.2.7 | 优化 |
| 3.2.8 | 新增执行用例自动重启Allure服务 |
| 3.2.9 | 优化POM生成器逻辑 |
| 3.2.10 | fix |
| 3.2.11 | fix |
| 3.2.12 | fix |
| 3.2.13 | 优化接口同名的情况 |
| 3.2.15 | 新增企业微信机器人 |
| 3.2.16 | fix已知问题 |
| 3.2.17 | 同上 |
| 3.2.18 | delete check_port函数 |
| 3.2.19 | 更新文档 |
| 3.3.0 | BUG描述信息替换为pytest用例错误信息 |
| 3.3.1 | 更新文档 |
| 3.4.0 | 命令行工具重构为子命令模式,新增 tools 命令 |
Metadata
Release files for xiaobaisaf 3.3.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| xiaobaisaf-3.3.2.tar.gz | 10.2 MB | Without provenance | Details for xiaobaisaf-3.3.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| xiaobaisaf-3.3.2-py3-none-any.whl | Python 3 | none | any | Details for xiaobaisaf-3.3.2-py3-none-any.whl |
Total release size: 26.1 MB
Release files / xiaobaisaf-3.3.2.tar.gz
| Download URL | xiaobaisaf-3.3.2.tar.gz |
|---|---|
| Size | 10.2 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7786bf0e8de60ac4d61f221b8648b35ab71a5639b85aa78ca5b276c321524f64
|
|
BLAKE2b-256 checksum How to use checksums |
a4864bac2dfa370e9dc982bd34eb45b953f1d0b26bb3e8b2798db0fe6b18d996
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.10
|
Release files / xiaobaisaf-3.3.2-py3-none-any.whl
| Download URL | xiaobaisaf-3.3.2-py3-none-any.whl |
|---|---|
| Size | 15.9 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a236a9512b639a43f7a3fe6e178d498f41c720fa53e01d5fe934184e6f8ff9d9
|
|
BLAKE2b-256 checksum How to use checksums |
d2f794148b465687eb46a3d0192dc6f7e42fd82ce248ef4dea23d2ca784c3e20
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.10
|
Security for xiaobaisaf 3.3.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.