Commit Graph
9 Commits
Author SHA1 Message Date
xst 18890c0437 refactor(tests): restructure into layered POM architecture with Allure reporting
- Split framework into core/ (config, logger, db, driver factories, screenshot,
  allure integration) and pages/ (PO layer: base/admin/driver); flatten test
  files per platform (web/admin, app/driver_android, cross_end)
- Slim root conftest.py 656 -> ~100 lines: drop inline CN HTML report, add
  Allure severity mapping (p0/p1/p2 -> blocker/normal/minor) and
  environment.properties; support both tests.*-prefixed and bare imports
- Preserve TC-D2S-001/002 cross-end E2E cases with business logic unchanged,
  add allure epic/feature/story/step annotations
- Deduplicate: single makereport hook, shared failure-screenshot helpers,
  single SCREENSHOTS_DIR constant; deterministic auth-state role loading
- Move DB credentials from db_helper.py into test_config.yaml (database section)
- Move pytest.ini to repo root; switch reporting to allure-pytest
  (drop pytest-html/junitxml); update requirements.txt accordingly
- Delete deprecated scaffolding: test_freight_full_flow + 6 stale page
  objects, iOS/shipper empty shells, dead utils
- Fix flaky vxe-table action-row wait: wait for a visible td instead of
  hidden placeholder rows (fixed shipper-payment timeouts)
- Verified end-to-end against live env: both E2E cases pass (2 passed 3m12s);
  run artifacts (logs/screenshots/allure) included per repo convention
2026-08-17 14:29:52 +08:00
xst f23051a876 feat(report): embed screenshots as base64 in report_cn.html with click-to-zoom preview
- Convert PNG screenshots to base64 and embed directly in HTML
- Grid gallery layout with thumbnail previews
- Click to expand/zoom to fullscreen overlays
- No external file dependencies — report is self-contained
2026-07-23 17:59:42 +08:00
xst 4ef8af5c87 feat(report): enrich Chinese report with detailed test metadata, logs, screenshots and phase timeline
- Add test metadata extraction: case ID, priority, tags, description
- Show phase timeline extracted from test log output
- Include test log content (last 500 lines) in collapsible section
- Include screenshot file list in collapsible section
- Redesign table with 8 columns and expandable error details
2026-07-23 17:16:11 +08:00
xst 273f4f0225 fix(report): extract Chinese test name from docstring metadata field
Priority: 用例名称: xxx > display_name > docstring first line
2026-07-23 16:57:30 +08:00
xst 570aaef64b fix(report): use utf-8-sig encoding for Chinese report to display correctly in browsers
The Chinese report now correctly shows:
  司机APP接单到管理端核算打款完整流程 [通过] (96.8s)
2026-07-23 16:55:17 +08:00
xst d1710cfcd6 feat(report): resolve Chinese test names from docstring in cn report
Test case docstring 【P0】 prefix is stripped for display.
报告中的用例名现在显示为: 司机APP接单到管理端核算打款完整流程
2026-07-23 16:50:47 +08:00
xst f287c93cce feat(report): auto-generate Chinese HTML report after test session via pytest_sessionfinish hook
Produces output/reports/report_cn.html alongside junit.xml and report.html
2026-07-23 16:42:59 +08:00
xst 03e152baab feat: 重构测试框架 — 覆盖 6 端 (管理端 + 小程序 + 4 个移动端)
目录结构:
  tests/web/admin/       管理端 (Playwright)
  tests/web/mini_program/ 司机端小程序 (Playwright/微信 WebView)
  tests/app/driver_android/  司机安卓 (Appium)
  tests/app/shipper_android/ 货主安卓 (Appium)
  tests/app/driver_ios/      司机苹果 (Appium)
  tests/app/shipper_ios/     货主苹果 (Appium)

公共模块:
  tests/app/_shared.py       driver+ensure_logged_in 工厂
  tests/app/_base_page.py    App Page Object 基类

配置:
  test_config.yaml 拆分为 6 个独立 section + 货主账号
2026-07-15 14:02:08 +08:00
xst aade9e39d0 feat: 基于 UI 自动化最佳实践的测试框架骨架搭建
- tests/config: 环境配置 (.yaml) + 配置加载器
- tests/utils: 日志工具 + 测试数据生成器
- tests/web: Playwright conftest + Page Object 基类 + 登录页 + 导航栏组件 + 登录用例(6条)
- tests/app: Appium conftest + Page Object 基类 + 司机端首页 + 登录用例(3条)
- pytest.ini: markers(p0/p1/p2/smoke/web/app) + 运行配置
- 所有用例按最佳实践采用 Page Object 模式 + data-testid 优先定位 + 失败自动截图
2026-07-15 10:24:22 +08:00