1个练习引起的系列学习之pytest生成测试报告 (三)

1、背景介绍
pytest提供了生成报告的功能。
使用pytest --help能够进行查看。
1个练习引起的系列学习之pytest生成测试报告 (三)html

2、 生成测试报告ide

  • -v 显示详情
    1个练习引起的系列学习之pytest生成测试报告 (三)学习

  • -q 只显示汇总信息
    1个练习引起的系列学习之pytest生成测试报告 (三)测试

    -r 用chars标识用例执行结果,(f)ailed, (E)error, (s)skipped, (x)failed, (X)passed, (p)passed, (P)passed with output, (a)all except pP.
    1个练习引起的系列学习之pytest生成测试报告 (三)3d

    --disable-warning ,disable warnings summary
    1个练习引起的系列学习之pytest生成测试报告 (三)xml

    -l ,show locals in tracebacks (disabled by default)
    1个练习引起的系列学习之pytest生成测试报告 (三)htm

--tb=style,traceback print mode (auto/long/short/line/native/no).
--tb=no
1个练习引起的系列学习之pytest生成测试报告 (三)blog

--full-trace don't cut any tracebacks (default is to cut).
1个练习引起的系列学习之pytest生成测试报告 (三)ip

--color=color color terminal output (yes/no/auto).
--color=no
1个练习引起的系列学习之pytest生成测试报告 (三)terminal

--junit-xml=path , create junit-xml style report file at given path.
1个练习引起的系列学习之pytest生成测试报告 (三)

--html=path , create html report file at given path.
1个练习引起的系列学习之pytest生成测试报告 (三)

相关文章
相关标签/搜索