[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 --alluredir=output/allure-results --clean-alluredir # 自定义 markers markers = p0: P0 核心流程(冒烟测试) p1: P1 主要功能 p2: P2 次要/异常流程 smoke: 冒烟测试 admin: 管理端 (Playwright) mini_program: 司机端小程序 (miniprogram-automator) driver_android: 司机安卓端 (Appium) appium: 所有 Appium 测试 playwright: 所有 Playwright 测试 cross_end: 跨端 E2E 测试(管理端 + 司机安卓端联动) api: API 接口测试 (tests/api/) yun8_sync: yun8 运输流程 API 造数(E2E + SQL 写入,会变更测试环境数据) # 日志格式 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