Skip to main content

pytest-testreport

1、pytest-testreport介绍

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

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

2、安装pytest-testreport

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

安装命令

pip install pytest-testreport-new

Download files

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

Source Distribution

pytest-testreport-new-0.0.1.tar.gz (13.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pytest_testreport_new-0.0.1-py3-none-any.whl (15.9 kB view details)

Uploaded Python 3

File details

Details for the file pytest-testreport-new-0.0.1.tar.gz.

File metadata

  • Download URL: pytest-testreport-new-0.0.1.tar.gz
  • Upload date:
  • Size: 13.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.8.9

File hashes

Hashes for pytest-testreport-new-0.0.1.tar.gz
Algorithm Hash digest
SHA256 06b767ac734ae10b1f4bf2374fc956788278533b287e646bb6c1fe52a4d6cdc9
MD5 5f6f361ff517c89834ade1bc85af5833
BLAKE2b-256 f7a292d7e62994a3f3dd03f2d0cf0c8e2bc1b5538ebd61d985cd9a4348c6720f

See more details on using hashes here.

File details

Details for the file pytest_testreport_new-0.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for pytest_testreport_new-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 7cf052d9fa685896a0f67c9b754a8cb1841235b0958a10c0bfc0484d8f9bd975
MD5 c0dc5fb9c21369f28083e34fc9560b4c
BLAKE2b-256 af0cdf6b17f83348a981f4a5e479dea7367152f7cce7d0d9a9b9c91b8a19e043

See more details on using hashes here.

Release history Release notifications | RSS feed

0.0.6

2 files

0.0.5

2 files

0.0.4

2 files

0.0.3

2 files

0.0.2

2 files

This release

0.0.1 This release

2 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