这是一个基于Python + Selenium的Web UI自动化测试框架,使用Page Object Model设计模式。
pages/: 页面对象类tests/: 测试用例utils/: 工具类(日志、驱动管理等)config/: 配置文件reports/: 测试报告logs/: 日志文件
- Python 3.8+
- Chrome/Firefox/Safari浏览器
pip install -r requirements.txt# 运行所有测试
pytest
# 运行指定测试
pytest tests/test_login.py
# 并行运行测试(4个进程)
pytest -n 4
# 生成Allure报告
pytest --alluredir=./reports/allure
allure serve ./reports/allure- 支持Page Object Model
- 支持多浏览器测试
- 支持并发执行
- 集成Allure报告
- 日志系统
- 跨平台支持