旨在简化基于多种协议的消息通信,内置了对JSON和Protobuf的序列化、反序列化支持,并设计为线程安全,让你可以轻松创建和管理成百上千个并发通信代理。
Project description
pybot_qp
项目介绍
这是一个基于Python的自动化测试框架,用于测试棋牌游戏项目。
环境配置
在运行测试之前,需要设置环境变量:
env_type: 指定测试环境,可选值为test、zlf、sf等
运行测试
# 设置环境变量并运行测试
env_type=test python -m pytest test_cases/mail/test_Mail_ReqGetMailList.py -v
# 或者在Windows PowerShell中:
$env:env_type="test"; python -m pytest test_cases/mail/test_Mail_ReqGetMailList.py -v
# 运行特定测试用例
env_type=test python -m pytest test_cases/mail/test_Mail_ReqGetMailList.py::test_有邮件时_获取邮件列表_返回正确列表 -v
项目结构
test_cases/: 测试用例目录prefabs/: 测试预制件目录utils/: 工具类目录data/: 配置文件目录proto/: 协议文件目录python_protos/: 协议Python文件目录
配置文件
data/test_config.yaml: 测试环境配置文件data/protos_config.yaml: 协议配置文件
启动环境
# clone
git clone https://git-lfs.ppgame.com/qa/pybot.git
# 生成虚拟环境
python -m venv env
# 启动虚拟环境
./env/Scripts/activate
如果出现错误:“.\env\Scripts\activate : 无法加载文件 D:\python_workspace\pybot\env\Scripts\Activate.ps1,因为在此系统上禁止运行脚本。”尝试将 PowerShell 的执行策略更改为允许加载未签名的脚本。打开 PowerShell 并以管理员身份运行,然后输入以下命令:Set-ExecutionPolicy RemoteSigned
# 下载依赖包
pip install -r requirements.txt
数据工厂
# 所有造数脚本,默认在工程的根目录执行。
# 造消极行为的数据
# 参数说明
python .\data_factory\generate_negative_data.py -h
# 范例
python .\data_factory\generate_negative_data.py --env q8 --uid 139896591 --modeType 2 --modeID 1001 --map 9005 --type 1
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file multi_proto_agent-0.1.0-py3-none-any.whl.
File metadata
- Download URL: multi_proto_agent-0.1.0-py3-none-any.whl
- Upload date:
- Size: 26.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fa397506878a5fae82c0f83956f4e6cc56a30ab5a05a81195b9a382a6bd915df
|
|
| MD5 |
8d3202f01d036382c4dd500654aa7256
|
|
| BLAKE2b-256 |
f7e9d63d1bbd33bfee462ac3b2052c897ff67eddaa97ed418e923fadc0bff56c
|