1個練習引發的系列學習之pytest生成測試報告 (三)

一、背景介紹
pytest提供了生成報告的功能。
使用pytest --help可以進行查看。
1個練習引發的系列學習之pytest生成測試報告 (三)

二、 生成測試報告

  • -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生成測試報告 (三)

    --disable-warning ,disable warnings summary
    1個練習引發的系列學習之pytest生成測試報告 (三)

    -l ,show locals in tracebacks (disabled by default)
    1個練習引發的系列學習之pytest生成測試報告 (三)

--tb=style,traceback print mode (auto/long/short/line/native/no).
--tb=no
1個練習引發的系列學習之pytest生成測試報告 (三)

--full-trace don't cut any tracebacks (default is to cut).
1個練習引發的系列學習之pytest生成測試報告 (三)

--color=color color terminal output (yes/no/auto).
--color=no
1個練習引發的系列學習之pytest生成測試報告 (三)

--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生成測試報告 (三)

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章