feat: 新增JoyHub UI自动化测试目录

1. 新增 Joyhub_ui_auto_test/ 目录:
   - tests/ - 测试用例目录
   - pages/ - 页面元素定位
   - config/ - 配置文件
   - utils/ - 工具类
   - test_data/ - 测试数据
   - reports/ - 测试报告
   - webapp-testing/ - WebApp测试相关

2. 配置文件:
   - pytest.ini - pytest配置
   - requirements.txt - 依赖列表
   - README.md - 项目说明
This commit is contained in:
2026-05-13 16:01:25 +08:00
parent 37a040c3e5
commit a94eb5dbbe
38 changed files with 2567 additions and 0 deletions

View File

@@ -0,0 +1,50 @@
# Joyhub_ui_auto_test
Python UI 自动化测试项目,基于 pytest + Playwright。
## 初始化
```bash
python -m venv .venv
.venv\Scripts\activate
pip install -r requirements.txt
playwright install
copy .env.example .env
```
## 运行测试
```bash
pytest
```
## 生成测试报告
项目已配置 pytest-html执行测试后会自动生成 HTML 测试报告:
```bash
pytest
```
报告存放路径:
```text
reports\allure-results\index.html
```
也可以只执行指定用例并生成报告:
```bash
python -m pytest tests/test_open_chrome_browser.py
```
## 目录结构
```text
config/ 配置读取
pages/ Page Object 页面对象
tests/ 测试用例
utils/ 通用工具
test_data/ 测试数据
reports/ 测试报告输出
```