Skip to main content

A pytest plugin that records the start, end, and result information of each use case in a log file

Project description

pytest-result-log

摘要

pytest-result-log是一个在日志文件中记录每个用例的开始、结束和结果信息的pytest插件。

预览

pytest-result-log是sanmu框架孵化的第三个pytest插件,

通过hook钩子的方式,可以准确判断所有类型的用例执行结果,并记录到日志文件中,效果如下

pytest-result.log

安装

执行命令

pip install pytest-result-log

启用

修改配置文件pyetst.ini

[pytest]

log_file = pytest.log
log_file_level = info
log_file_format   = %(levelname)-8s %(asctime)s [%(name)s:%(lineno)s]  : %(message)s
log_file_date_format  = %Y-%m-%d %H:%M:%S

文档

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

pytest_result_log-1.2.2-py3-none-any.whl (4.6 kB view details)

Uploaded Python 3

File details

Details for the file pytest_result_log-1.2.2-py3-none-any.whl.

File metadata

File hashes

Hashes for pytest_result_log-1.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 147b363113812825da817d799c76e1b0f20a772ae8efaf9f4c08558ca79c1067
MD5 570139114a3debac54dba9c7ad09e806
BLAKE2b-256 dd9326dbbbb57634fde9cf0bf960506fd3d2ee9eb37d4f0fd6cf4f635f88a8ca

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page