【问题标题】:How to create custom test report (csv or excel format) for python pytest test如何为 python pytest 测试创建自定义测试报告(csv 或 excel 格式)
【发布时间】:2018-10-27 02:29:43
【问题描述】:

我正在使用 pytest 使用以下命令运行我的测试,并以 html 格式生成报告。我在 conftest.py 中使用了 hookwrapper 来生成 html 报告。

Code to run the test :
py.test --html=report.html --self-contained-html test.py

我想知道是否有办法使用 python pytest 生成 csv 或 excel 格式的自定义报告

【问题讨论】:

    标签: python-2.7 pytest


    【解决方案1】:

    来自我的另一个answer:

    我一直在使用pytest-excel插件生成xls文件报告。

    用法:

    pip install pytest-excel

    pytest --excelreport=report.xls

    它会生成report.xls excel文件。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2018-04-05
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多