- 将 `CaseGenerator` 拆分为 `CaseDataLoader`(数据加载)和 `CaseGenerator`(用例构造),实现单一职责原则。 - 引入 `TestTemplateBase` 作为纯净的方法挂载容器,避免逻辑代码污染测试用例。 - 优化 YAML 解析流程,将文件扫描、参数化解析与 pytest 方法构建逻辑完全分离。 - 改进装饰器写法,使用更直观的 @ 语法糖处理 Allure 和 pytest.mark.parametrize。 - 增强执行日志,通过类型注解和实例引用记录更详细的运行上下文。
25 lines
495 B
TOML
25 lines
495 B
TOML
[project]
|
|
name = "interfaceautotest"
|
|
version = "0.1.0"
|
|
description = ""
|
|
readme = "README.md"
|
|
requires-python = ">=3.11"
|
|
dependencies = [
|
|
"requests>=2.32.3",
|
|
"pyyaml>=6.0.1",
|
|
"pytest>=8.3.3",
|
|
"jsonpath>=0.82.2",
|
|
"pymysql>=1.1.1",
|
|
"pytest-result-log>=1.2.2",
|
|
"allure-pytest>=2.13.5",
|
|
"cryptography>=44.0.2",
|
|
"python-dotenv>=0.9.9",
|
|
"pydantic>=2.12.5",
|
|
"lxml>=6.0.2",
|
|
]
|
|
|
|
|
|
[[tool.uv.index]]
|
|
url = "https://pypi.tuna.tsinghua.edu.cn/simple"
|
|
default = true
|