Skip to main content

pytest-testreport

1、pytest-testreport介绍

pytest-testreport是一个针对pytest的生成html报告的插件,使用起来非常简单,安装好pytest-testreport之后,运行用例时加上参数即可生成报告

注意点:如果安装了pytest-html这个插件,请先卸载,不然会有冲突
使用案例:
  • 命令行执行: pytest 运行测试时加上参数--report 指定报告文件名
    # 指定报告文件名
    pytest --report=musen.html
    
    #其他配置参数
    --title=指定报告标题
    --tester=指定报告中的测试者
    --desc = 指定报告中的项目描述
    
    # 同时使用多个参数
    pytest --report=musen.html --title=测试报告 --tester=测试菜鸟 --desc=项目描述
    
  • pytest.main执行
    import pytest
    
    pytest.main(['--report=musen.html',
                 '--title=测试报告标题',
                 '--tester=木森',
                 '--desc=报告描述信息'])
    

2、安装pytest-testreport

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

安装命令

pip install pytest-testreport

3、使用文档:

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

备注:

  • 开发者:柠檬班—木森、柠檬班—雨泽
  • E-mail:musen_nmb@qq.com
  • 大家在使用过程中发现bug,可以联系我,以便优化解决!

Metadata

Release files for pytest-testreport 1.1.6

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-testreport 1.1.6
File Size Uploaded
pytest-testreport-1.1.6.tar.gz 13.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pytest-testreport 1.1.6
File Interpreter ABI Platform
pytest_testreport-1.1.6-py3-none-any.whl Python 3 none any Details

Total release size: 29.3 kB

Release files / pytest-testreport-1.1.6.tar.gz

Download URL pytest-testreport-1.1.6.tar.gz
Size 13.7 kB
Tags Source
SHA-256 checksum
How to use checksums
362ac270324411f3930f0654cd38bc4642bb1258db5d188b66a150250adbe406
BLAKE2b-256 checksum
How to use checksums
bb8d81d1c4b5eddfd426bafa0c8d23815832deac1cc46b426add883f6c452c11
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.5.0.1 requests/2.27.1 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.7.3

Release files / pytest_testreport-1.1.6-py3-none-any.whl

Download URL pytest_testreport-1.1.6-py3-none-any.whl
Size 15.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a25a51290e20b66e013ba728e23c98f879233b87686ed9d13120b121b56ee397
BLAKE2b-256 checksum
How to use checksums
5a12a79e8f72f41f3b4d06a9057511afbfee60975ac41bee3bb744bbb5a0087a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.5.0.1 requests/2.27.1 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.7.3

Release history Release notifications | RSS feed

This release

1.1.6 This release

2 release files

1.1.5

2 release files

1.1.2

2 release files

1.1.1

2 release files

1.1.0

2 release files

1.0.9

2 release files

1.0.8

2 release files

1.0.7

2 release files

1.0.6

2 release files

1.0.5

2 release files

1.0.4

2 release files

1.0.3

2 release files

1.0.2

2 release files

1.0.1

2 release files

1.0.0

2 release files

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