Files
QaAutomationHub/tests/config/test_config.yaml
T
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

148 lines
7.3 KiB
YAML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# 运八网络货运平台 — 测试环境配置
# 数据来源: knowledge_base/00_project/project_profile.md
# 使用方式: from tests.core.config_loader import load_config
#
# 覆盖端:
# Web: 管理端 admin / 司机端小程序 mini_program
# App: 司机安卓 driver_android
# (预留: 货主安卓 shipper_android / 苹果端 driver_ios / shipper_ios)
# ═══════════════════════════════════════════════════════════════════
# ── 管理端 (Web/Playwright) ──
# ═══════════════════════════════════════════════════════════════════
admin:
base_url: "https://ybxcx.ynyun8.com:8000/admin"
api_base_url: "https://ybxcx.ynyun8.com:8000/"
timeout_seconds: 120
screenshot_on_failure: true
screenshot_on_step: false
browsers:
- chromium
- firefox
viewport:
width: 1920
height: 1080
# 登录态复用: python tests/web/admin/save_auth.py 生成后自动跳过验证码
skip_login: true
storage_state_dir: "tests/web/auth"
# ═══════════════════════════════════════════════════════════════════
# ── 司机端小程序 (miniprogram-automator / Node.js) ──
# ═══════════════════════════════════════════════════════════════════
# 原理: Python pytest → subprocess → node runner.js → miniprogram-automator
# 操控微信开发者工具中的小程序,返回 JSON 结果
#
# 前置条件:
# 1. 安装微信开发者工具 + 开启服务端口(设置 → 安全 → 服务端口)
# 2. uni-app 编译为微信小程序: npm run build:mp-weixin
# 3. 安装依赖: cd tests/web/mini_program/automator && npm install
mini_program:
# uni-app 编译出的小程序项目路径(.js/.json/.wxml 所在目录)
project_path: "E:/test/QaAutomationHub/mini_program/dist" # ⚠️ 请确认实际路径
# 微信开发者工具 CLI 路径(Windows 默认如下,macOS 为 /Applications/...)
dev_tool_path: "C:/Program Files (x86)/Tencent/微信web开发者工具/cli.bat"
timeout_seconds: 120
screenshot_on_failure: true
# ═══════════════════════════════════════════════════════════════════
# ── 司机安卓端 (App/Appium) ──
# ═══════════════════════════════════════════════════════════════════
driver_android:
appium_host: "http://localhost:4723"
timeout_seconds: 120
screenshot_on_failure: true
platform: android
skip_login: true # 手动登录一次后 noReset 自动复用
device_name: "Android Emulator"
app_package: "com.arpa.ynchenggangdriver" # ⚠️ 请确认实际包名
app_activity: "com.arpa.ntocc.MainActivity" # ⚠️ 请确认实际启动 Activity
no_reset: true
new_command_timeout: 120
# ═══════════════════════════════════════════════════════════════════
# ── 货主安卓端 (App/Appium) ──
# ═══════════════════════════════════════════════════════════════════
shipper_android:
appium_host: "http://localhost:4723"
timeout_seconds: 120
screenshot_on_failure: true
platform: android
skip_login: true
device_name: "Android Emulator"
app_package: "com.arpa.ynChengGangShipper" # ⚠️ 请确认实际包名
app_activity: "com.arpa.wuche_shipper.MainActivity" # ⚠️ 请确认实际启动 Activity
no_reset: true
new_command_timeout: 120
# ═══════════════════════════════════════════════════════════════════
# ── 司机苹果端 (App/Appium,需 macOS) ──
# ═══════════════════════════════════════════════════════════════════
driver_ios:
appium_host: "http://localhost:4723"
timeout_seconds: 120
screenshot_on_failure: true
platform: ios
skip_login: true
device_name: "iPhone 15"
bundle_id: "com.arpa.ynchenggangdriver" # ⚠️ 请确认实际 Bundle ID
no_reset: true
new_command_timeout: 120
# ═══════════════════════════════════════════════════════════════════
# ── 货主苹果端 (App/Appium,需 macOS) ──
# ═══════════════════════════════════════════════════════════════════
shipper_ios:
appium_host: "http://localhost:4723"
timeout_seconds: 120
screenshot_on_failure: true
platform: ios
skip_login: true
device_name: "iPhone 15"
bundle_id: "com.yunba.shipper" # ⚠️ 请确认实际 Bundle ID
no_reset: true
new_command_timeout: 120
# ═══════════════════════════════════════════════════════════════════
# ── 测试账号 ──
# ═══════════════════════════════════════════════════════════════════
accounts:
super_admin:
phone: "super_admin"
password: "951260684NiAi.."
role: "平台运营人员"
use_on: [admin]
team_leader:
phone: "13113113113"
password: "88888888"
role: "车队长"
use_on: [admin, mini_program]
driver:
phone: "15188888888"
password: "88888888"
role: "司机"
use_on: [mini_program, driver_android, driver_ios]
shipper:
phone: "13800000000" # ⚠️ 请确认实际货主账号
password: "88888888"
role: "货主"
use_on: [shipper_android, shipper_ios]
# ═══════════════════════════════════════════════════════════════════
# ── 数据库 (tests/core/db_helper.py 使用) ──
# ═══════════════════════════════════════════════════════════════════
database:
host: "36.137.133.24"
port: 3306
user: "ntocc"
password: "Rgxi3!kD9jjXpgzx"
database: "ntocc"
charset: "utf8mb4"