From 6ff65ec5c83af65d5e2f6659b1bb654217f41313 Mon Sep 17 00:00:00 2001 From: xst Date: Thu, 23 Jul 2026 16:36:39 +0800 Subject: [PATCH] feat(report): add pytest-html + junitxml report generation to pytest.ini pytest-html generates self-contained HTML report at output/reports/report.html junitxml output at output/reports/junit.xml for CI integration --- requirements.txt | 1 + tests/pytest.ini | 3 +++ 2 files changed, 4 insertions(+) diff --git a/requirements.txt b/requirements.txt index 7ea8276..a326921 100644 --- a/requirements.txt +++ b/requirements.txt @@ -6,3 +6,4 @@ playwright>=1.40 Pillow>=10.0 # 截图像素对比 (result-reporter Agent) # Appium-Python-Client>=3.0 # 取消注释以启用移动端自动化 pymysql>=1.0 # 数据库操作(测试中更新风控状态等) +pytest-html>=4.0 # pytest HTML 报告 diff --git a/tests/pytest.ini b/tests/pytest.ini index a65e763..41d5d2d 100644 --- a/tests/pytest.ini +++ b/tests/pytest.ini @@ -16,6 +16,9 @@ addopts = --strict-markers --disable-warnings -p no:cacheprovider + --html=output/reports/report.html + --self-contained-html + --junitxml=output/reports/junit.xml # 自定义 markers markers =