feat(executor): 重构用例加载与执行逻辑,支持参数化变量优先级
- 引入 CaseEntity 包装器,实现数据模型与执行上下文解耦。 - 移除加载阶段的 deepcopy,优化大规模参数化用例的内存占用。 - 实现 perform 阶段的局部变量注入,确保参数化数据优先级高于全局缓存。
This commit is contained in:
25
pytest.ini
25
pytest.ini
@@ -1,11 +1,22 @@
|
||||
[pytest]
|
||||
testpaths = tests
|
||||
addopts = -q --show-capture=no
|
||||
addopts = -q --show-capture=no --reruns 2 --reruns-delay 1
|
||||
|
||||
# 1. 开启实时控制台日志
|
||||
log_cli = True
|
||||
log_cli_level = INFO
|
||||
log_cli_format = %(asctime)s %(levelname)-5s [%(name)s] - %(message)s
|
||||
log_cli_date_format = %H:%M:%S
|
||||
|
||||
log_file = logs/pytest.log
|
||||
log_file_level = debug
|
||||
log_file_format = %(asctime)s [%(name)s] %(levelname)s %(module)s.%(funcName)s:%(lineno)d - %(message)s
|
||||
log_file_date_format = %m/%d/%Y %H:%M:%S %p
|
||||
# 2. 开启日志文件记录
|
||||
log_file = outputs/logs/pytest.log
|
||||
log_file_level = INFO
|
||||
log_file_format = %(asctime)s %(levelname)-5s [%(name)s] %(module)s.%(funcName)s:%(lineno)d - %(message)s
|
||||
log_file_date_format = %Y-%m-%d %H:%M:%S
|
||||
|
||||
disable_test_id_escaping_and_forfeit_all_rights_to_community_support = true
|
||||
# 3. 基础配置
|
||||
# 解决中文测试用例显示为乱码(Unicode)的问题
|
||||
disable_test_id_escaping_and_forfeit_all_rights_to_community_support = True
|
||||
|
||||
# 限制 Pytest 搜索范围,提升启动速度
|
||||
testpaths = test_cases
|
||||
python_files = test_*.py
|
||||
Reference in New Issue
Block a user