Jeevan.fu 2023-03-20 17:18 采纳率: 50%
浏览 40

使用 pytest-testreport 生成测试报告, 运行测试时加上参数 --report能不能指定报告存储的文件夹位置

在使用 pytest 运行测试时,如果要使用 pytest-testreport 生成测试报告, 运行测试时加上参数 --report 指定报告文件名,即可实现。
那我们能不能用--report指定报告存储的文件夹位置?

pytest --report=musen.html --title=测试报告 --tester=木森 --desc=项目描述  --template=2

  • 写回答

1条回答 默认 最新

  • CSDN专家-sinJack 2023-03-20 17:24
    关注

    测试一下不就知道了
    使用 pytest-html 插件来生成 HTML 格式的测试报告,并使用 --html 参数 可以指定报告存储的文件夹位置

    pytest --html=path/to/html/report.html # 指定报告路径为path/to/html
    
    评论 编辑记录

报告相同问题?

问题事件

  • 创建了问题 3月20日