SensoroApiAutoTest/pytest.ini

43 lines
1.4 KiB
INI
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

[pytest]
# 命令行参数
;addopts = -vs
; --alluredir=./outFiles/Temp
; --html=./outFiles/pytest_report/pytest_report.html
; --self-contained-html
; --clean-alluredir
; --capture=sys
; --allure-no-captureprint()和日志的输出不会进入 Allure 报告Allure 只会收集手动添加的 allure.attach() 相关内容)
; --allure-link-pattern=issue:http://your-issue-tracker/{}
; --allure-link-pattern=test_case:http://your-test-case-tracker/{}
# 测试文件配置
;testpaths = testCase/
;python_files = test_*.py
;python_classes = Test*
;python_functions = test_*
# 严格模式(让 @pytest.mark.xfail 失败的测试用例在“意外通过”时,变为真正的失败)
;xfail_strict = true
# 自定义标记
markers =
smoke: 冒烟测试用例
demo: 演示用例
test: 测试用例
api: API测试用例
high: 高优先级
medium: 中优先级
low: 低优先级
;日志相关
;控制台输出日志内容默认False
;log_cli = 1
;addopts = -p no:logging
;log_cli_level = ERROR
;log_cli_date_format = %Y-%m-%d %H:%M:%S
;log_cli_format = %(asctime)s-%(filename)s[line:%(lineno)d]-%(levelname)s-%(message)s
;log_file = test.log
;log_file_level = INFO
;log_file_date_format = %Y-%m-%d %H:%M:%S
;log_file_format = %(asctime)s-%(filename)s[line:%(lineno)d]-%(levelname)s-%(message)s