MangoPytest 项目部署指南
部署注意事项
重要提醒
- 首次部署请仔细阅读文档,严格按照流程和顺序执行
- 请确保Python版本为3.10.x,其他版本可能导致兼容性问题
- 如果遇到问题,请先自行排查环境配置是否正确
- 执行过程中出现的提示信息,请自行判断是否为错误
环境检查
首先检查Python版本:
shell
python -V预期输出:
Python 3.10.4注意
必须使用Python 3.10.x版本,其他版本不支持!
部署步骤
1. 克隆项目代码
shell
git clone https://gitee.com/mao-peng/MangoPytest.git2. 进入项目根目录
shell
cd MangoPytest3. 创建虚拟环境(推荐)
shell
# Windows
python -m venv venv
venv\Scripts\activate
# Linux/Mac
python -m venv venv
source venv/bin/activate4. 安装依赖包
shell
pip install -r requirements.txt5. 安装Allure(用于生成测试报告)
Allure的安装方法请参考官方文档或网上教程,此处不再赘述。
6. 执行Demo用例验证
shell
python main.py