6f5668b7ec
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.
41 lines
1017 B
INI
41 lines
1017 B
INI
[pytest]
|
|
# pytest 配置文件
|
|
|
|
# 测试发现路径
|
|
testpaths = tests
|
|
|
|
# 仅执行以 test_ 开头的文件
|
|
python_files = test_*.py
|
|
python_classes = Test*
|
|
python_functions = test_*
|
|
|
|
# 默认命令行参数
|
|
addopts =
|
|
-v
|
|
--tb=short
|
|
--strict-markers
|
|
--disable-warnings
|
|
-p no:cacheprovider
|
|
|
|
# 自定义 markers
|
|
markers =
|
|
p0: P0 核心流程(冒烟测试)
|
|
p1: P1 主要功能
|
|
p2: P2 次要/异常流程
|
|
smoke: 冒烟测试
|
|
admin: 管理端 (Playwright)
|
|
mini_program: 司机端小程序 (Playwright)
|
|
driver_android: 司机安卓端 (Appium)
|
|
shipper_android: 货主安卓端 (Appium)
|
|
driver_ios: 司机苹果端 (Appium)
|
|
shipper_ios: 货主苹果端 (Appium)
|
|
appium: 所有 Appium 测试
|
|
playwright: 所有 Playwright 测试
|
|
cross_end: 跨端 E2E 测试(管理端 + 司机安卓端联动)
|
|
|
|
# 日志格式
|
|
log_cli = true
|
|
log_cli_level = INFO
|
|
log_cli_format = %(asctime)s [%(levelname)s] %(name)s — %(message)s
|
|
log_cli_date_format = %H:%M:%S
|