【问题标题】:Generate csv file report with pytest使用 pytest 生成 csv 文件报告
【发布时间】:2017-04-18 19:26:03
【问题描述】:

是否有可能以某种方式在 csv 文件中生成测试执行报告? 我使用 python、selenium、pytest。 任何建议将不胜感激!

【问题讨论】:

  • 不,但您可以很容易地转换 xml 或 json(单独的模块)输出。
  • 你有什么例子吗?
  • 好的,我会尝试搜索:) 还是谢谢你

标签: python selenium pytest


【解决方案1】:

您可以使用 pytest 的 plugin API 来执行此操作 - 参见例如pytest-json 类似的东西。

【讨论】:

    【解决方案2】:

    我写了一个pytest-csv 插件,希望对你有帮助。

    【讨论】:

      【解决方案3】:

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

      用法:

      pip install pytest-excel pytest --excelreport=report.xls

      它将生成report.xls excel文件。

      【讨论】:

        猜你喜欢
        • 2014-12-13
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2017-11-28
        • 2014-06-05
        • 1970-01-01
        • 2020-07-01
        相关资源
        最近更新 更多