Files
novalon-website/e2e-tests/pyproject.toml
T
张翔 f14002559e feat(e2e-tests): 添加端到端测试框架及测试用例
refactor(components): 调整头部和页脚布局样式
style(hero-section): 更新徽章动画效果

docs: 添加测试框架README文档
test: 实现首页、导航和联系表单的测试用例
ci: 添加CI测试脚本和配置
2026-02-02 19:36:33 +08:00

49 lines
1.3 KiB
TOML

[tool.pytest.ini_options]
testpaths = ["tests"]
python_files = ["test_*.py"]
python_classes = ["Test*"]
python_functions = ["test_*"]
addopts = [
"--tb=short",
"--strict-markers",
"-v",
"--html=reports/test_report.html",
"--self-contained-html",
"--cov=utils",
"--cov-report=html",
"--cov-report=term-missing"
]
markers = [
"smoke: 冒烟测试,快速验证核心功能",
"regression: 回归测试,完整功能验证",
"performance: 性能测试,页面加载和响应时间",
"responsive: 响应式测试,不同屏幕尺寸",
"cross_browser: 跨浏览器测试",
"form: 表单相关测试",
"navigation: 导航测试",
"interactive: 用户交互测试"
]
filterwarnings = [
"ignore::DeprecationWarning",
"ignore::PendingDeprecationWarning",
"ignore::pytest.PytestUnraisableExceptionWarning"
]
[tool.pytest]
# pytest-asyncio配置
asyncio_mode = "auto"
asyncio_default_fixture_loop_scope = "function"
[tool.coverage.run]
branch = true
source = ["pages", "utils", "tests"]
omit = ["tests/*", "utils/report_generator.py", "utils/data_generator.py"]
[tool.coverage.report]
exclude_lines = [
"pragma: no cover",
"def __repr__",
"raise AssertionError",
"raise NotImplementedError"
]