Skip to main content

旨在简化基于多种协议的消息通信,内置了对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

If you're not sure about the file name format, learn more about wheel file names.

multi_proto_agent-0.1.0-py3-none-any.whl (26.8 kB view details)

Uploaded Python 3

File details

Details for the file multi_proto_agent-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for multi_proto_agent-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 fa397506878a5fae82c0f83956f4e6cc56a30ab5a05a81195b9a382a6bd915df
MD5 8d3202f01d036382c4dd500654aa7256
BLAKE2b-256 f7e9d63d1bbd33bfee462ac3b2052c897ff67eddaa97ed418e923fadc0bff56c

See more details on using hashes here.

Supported by

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