Commit Graph

22 Commits

Author SHA1 Message Date
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 6ff65ec5c8 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
2026-07-23 16:36:39 +08:00
xst a361ba7053 fix(login): use text selectors for bottom nav tabs 首页/货源/我的
Replace coordinate tap with text-based UiSelector for reliability.
Add back-press loop to ensure app is on main page before checking login.
2026-07-22 17:31:19 +08:00
xst f75a6f5ec9 feat(cross_end): add driver-to-settlement E2E test with SQL retry
- Add DriverFreightFlowPage (Android): 28-step flow covering accept/load/unload
- Add FreightAccountingPage (Web): accounting/audit/finance-payment/shipper-payment
- Add db_helper: update_risk_control_status via pymysql
- Fix ensure_logged_in: coordinate tap on 'mine' tab + login check
- Add test_driver_to_settlement.py: full cross-end E2E with SQL retry

Co-authored-by: xst <xst@ntocc.com>
2026-07-22 17:18:52 +08:00
xst 6f5668b7ec feat(cross_end): add cross-platform E2E test support for freight full flow
Add tests/cross_end/ directory with dual-driver architecture:
- conftest.py: Playwright admin_page + Appium app_driver fixtures
- Admin Page Objects: FreightSourcePage, WaybillManagementPage, SettlementPage
- App Page Objects: DriverOrderListPage, DriverTransportPage, DriverHomePage (re-export)
- test_freight_full_flow.py: 8-step end-to-end test (publish → accept → load → unload → accounting → review → shipper pay → platform pay)
- Shared context dict for cross-step data passing
- Graceful skip when either Playwright or Appium is unavailable
- All selectors marked with ⚠️ placeholders for discovery against real environments

Add cross_end marker to pytest.ini for selective execution.
2026-07-21 09:10:08 +08:00
xst b822428a2a feat(mini_program): 小程序端从 Playwright 切换为 miniprogram-automator
驱动方式: Python pytest → subprocess → node runner.js → miniprogram-automator → 微信开发者工具
架构: tests/web/mini_program/automator/ (Node.js) + conftest.py (Python subprocess 桥接)

前置条件: 微信开发者工具 + 开启服务端口 + npm install + uni-app build:mp-weixin
2026-07-15 17:34:25 +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 4b4b83a2c0 fix: save_auth 改为纯手动模式,不再尝试自动填表
用户自己在浏览器中完成验证码登录后按 Enter,脚本仅负责检测并保存 storage_state
2026-07-15 10:59:24 +08:00
xst 49eb9bcd2b fix: 适配 hash 路由登录页 (/#/login) 2026-07-15 10:55:08 +08:00
xst 7c5a4c5de7 fix: Playwright API camelCase → snake_case (Python 版)
- getByPlaceholder → get_by_placeholder
- getByRole → get_by_role
- getByText → get_by_text
- getByTestId → get_by_test_id
2026-07-15 10:52:16 +08:00
xst 7b4a54f1ce feat: 框架增加登录态复用机制,绕过图形验证码
Web 端 (storage_state):
- 新增 tests/web/save_auth.py: 手动登录后保存 cookies+localStorage
- conftest.py: skip_login:true 时自动加载 storage_state,跳过 UI 登录
- ensure_login fixture: 登录态有效则直接通过,过期则给出明确指引

App 端 (noReset):
- conftest.py: ensure_logged_in fixture,手动登录后无需重新登录
- noReset=true 持久化登录态,未登录自动检测并给出明确引导

配置文件:
- web.skip_login: true + storage_state_dir
- app.skip_login: true + 手动登录说明
2026-07-15 10:47:34 +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
xst 26ef99f7e7 docs: Web + App UI 自动化测试最佳实践 v1.0 2026-07-15 09:38:01 +08:00
xst 56137c95ed docs: ui automation best practices design spec 2026-07-15 09:29:31 +08:00
xst 2bc036c867 feat: 安徽运八需求全流水线输出同步 + 知识库/agents/资源文件更新 2026-07-14 15:50:17 +08:00
xst e34a3c64ce feat: knowledge sync — 安徽运八需求知识沉淀回写知识库
知识库更新:
- historical_defects.md: +4条数据上报领域真实缺陷模式
  (阶段依赖链断裂/重试幂等/跨模块数据不一致/省份代码硬编码)
- common_missed_scenes.md: +11条数据上报专项易漏场景
  (多阶段依赖/第三方核验逐项/重试并发/跨模块一致性/省份隔离等)
- data_reporting_cases.md: 新增数据上报类需求优秀用例范式
  (8大覆盖框架+5条示例用例+7项关键风险点)
- terminology.md: +14条数据上报领域术语

系统修复:
- case_pipeline.py: 注册 data_reporting_cases.md + order_manage_cases.md
- governance_audit.py: 更新 case_generate/AGENTS 关键词期望(旧→新架构)
- AGENTS.md/README.md/.claude: 补全缺失关键词,治理审计通过
- .claude/skills/case_generate/: 创建向后兼容别名 skill
2026-07-13 14:22:31 +08:00
xst d4c3d66efc feat: 集成 XMind 思维导图导出到 QE Fleet 工作流
- fleet_runner.py: _run_export() 在 Excel 导出后自动生成 XMind
- fleet_runner.py: 新增 --skip-xmind 参数(run/export 命令均支持)
- export_XMind.py: 按模块分组 → 用例编号/标题/优先级/前置条件/步骤/预期/备注树形结构
- XMind 输出目录: output/xmind_reports/

用法:
  python scripts/fleet_runner.py export --requirement <需求>       # Excel + XMind
  python scripts/fleet_runner.py export --requirement <需求> --skip-xmind  # 仅 Excel
  python scripts/export_XMind.py --base-name <名称>               # 独立 XMind 导出
2026-07-13 09:56:50 +08:00
xst acdb441507 feat: /qe-fleet run 安徽运八需求 + 系统坑修复
系统修复:
- fleet_runner.py: Windows UTF-8 编码兼容(reconfigure stdout/stderr)
- fleet_runner.py: run 命令自动生成合并清单供导出使用
- fleet_manifest.py: 新增 save_merged_manifest() 保存统一清单
- fleet_config.yml: 修复 YAML keywords 格式(block sequence → flow sequence)
- 恢复被误删的知识库文件(payment_flow_cases, marketing_activity_cases)

QE Fleet 产物 (安徽运八需求):
- 153个测试点 + 53条可执行测试用例
- 需求分析/风险评估/测试策略/质量裁决(PASS)
- Excel 导出 + 版本快照 v2
- 确认结论文件已归档
2026-07-13 09:49:54 +08:00
xst b958b75899 feat: one-click Windows setup scripts + fix Appium v3 commands in docs
- scripts/setup_execute_env.bat: auto-detect Android SDK, set PATH permanently, validate all deps
- scripts/start_appium.bat: one-click Appium Server startup with v3-compatible params
- Fix all 'appium --allow-insecure' commands for Appium v3 (driver:feature format)
- Add Windows quick-start section to EXECUTE_SETUP_GUIDE.md
2026-07-10 15:13:09 +08:00
xst d37017534d docs: Execute zone setup guide - PC/Android/iOS step-by-step configuration 2026-07-10 11:28:13 +08:00
xst 4f30b9d702 feat: Execute zone - Playwright PC Web + Appium mobile + AI screenshot diff + test conclusion reports
- Add 3 new agents: web-executor, mobile-executor, result-reporter
- web-executor: Playwright multi-browser (Chromium/Firefox/WebKit) automated scripts
- mobile-executor: Appium dual-platform (Android/iOS) automated scripts
- result-reporter: pixel-level AI visual comparison + test conclusion report with screenshots
- Auto-generate executable Python test scripts from Markdown test cases
- Screenshot strategies: on-failure (default) + on-step (optional)
- Visual diff grading: <1% pass / 1-5% minor / 5-15% UI_DIFF / >15% blocker
- Failure multi-classification: REAL_BUG/UI_DIFF/ENV_ISSUE/DATA_ISSUE/CASE_BUG/SCRIPT_ERROR
- requirements.txt: add playwright + Pillow
- Fleet now: 17 agents across 6 battle zones
2026-07-10 11:03:58 +08:00
xst b2a035c4f9 feat: Agentic QE Fleet v2.0.0 - 14-agent quality engineering platform
- 14 specialized AI agents across 5 battle zones (Prepare/Analyze/Design/Review/Monitor)
- New: risk-assessor, test-strategist, data-builder, coverage-auditor, quality-gatekeeper, execution-analyst, knowledge-curator
- New: fleet_runner.py orchestrator with multi-zone manifest pipeline
- New: fleet_config.yml for centralized configuration
- New: knowledge activation system (keyword + semantic matching)
- New: semantic conflict detection with severity grading (P0-P3)
- New: three-tier quality gate (PASS/PASS_WITH_FIX/BLOCKED)
- New: monitor zone for test execution analysis and auto knowledge curation
- Backward compatible: /case_generate alias, case_pipeline.py preserved
- Comprehensive docs: USER_GUIDE.md + MAINTENANCE_GUIDE.md
2026-07-09 14:29:11 +08:00