Skip to main content

pytest-chinesereport

1、pytest-chinesereport介绍

pytest-chinesereport 是一个针对 pytest 生成中文版 html 报告的插件,基于 pytest-testreport 进行了优化及 bug 修复,安装好pytest-chinesereport之后,运行用例时加上参数即可生成报告

注意点:如果安装了 pytest-html 这个插件,请先卸载,不然会有冲突
注意点:如果安装了 pytest-testreport 这个插件,请先卸载,不然会有冲突
使用案例:
  • 命令行执行: pytest 运行测试时加上参数--report 指定报告文件名
    # 指定报告文件名(report为时间戳+后缀,full_report为完整报告文件名,二选一)
    pytest --report=_report.html
    pytest --full_report=full_name.html
    
    #其他配置参数
    --title=指定报告标题
    --tester=指定报告中的测试者
    --desc = 指定报告中的项目描述
    
    # 同时使用多个参数
    pytest --report=report.html --title=测试报告 --tester=测试人员 --desc=项目描述
    
  • pytest.main执行
    import pytest
    
    pytest.main(['--report=report.html',
                 '--title=测试报告标题',
                 '--tester=测试人员',
                 '--desc=报告描述信息'])
    

2、安装pytest-chinesereport

pytest-chinesereport是基于python3.6开发的,安装前请确认你的python版本>3.6

安装命令

pip install pytest-chinesereport

3、使用文档:

https://unittestreport.readthedocs.io/en/latest/doc9_pytest/

备注:

  • 基于 pytest-testreport 进行 bug 修复及优化

Metadata

Release files for pytest-chinesereport 1.0.7

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pytest-chinesereport 1.0.7
File Size Uploaded Provenance
pytest_chinesereport-1.0.7.tar.gz 17.5 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for pytest-chinesereport 1.0.7
File Interpreter ABI Platform
pytest_chinesereport-1.0.7-py3-none-any.whl Python 3 none any Details

Total release size: 36.5 kB

Release files / pytest_chinesereport-1.0.7.tar.gz

Download URL pytest_chinesereport-1.0.7.tar.gz
Size 17.5 kB
Tags Source
SHA-256 checksum
How to use checksums
4d59c1ed7d0e0938056456e8640fb8bfbe9c2b579fa1e2e2d56899a46ef10c52
BLAKE2b-256 checksum
How to use checksums
ec29173c1caf3a745be4e4ed33e7e66e23024a4755c0309b2e49016b3bf145c3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.3

Release files / pytest_chinesereport-1.0.7-py3-none-any.whl

Download URL pytest_chinesereport-1.0.7-py3-none-any.whl
Size 19.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
96b19be50dcccb581f147d75308771b40fdc9e7135a993059cce36b4c1dd0266
BLAKE2b-256 checksum
How to use checksums
5f3eb650496093d80742895c3ac5d747b365e82adf8bfbe5b5c6965212a33ef7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.3

Security for pytest-chinesereport 1.0.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page