一、背景介紹
pytest提供了生成報(bào)告的功能。
使用pytest --help可以進(jìn)行查看。
二、 生成測(cè)試報(bào)告
-v 顯示詳情
-q 只顯示匯總信息
-r 用chars標(biāo)識(shí)用例執(zhí)行結(jié)果,(f)ailed, (E)error, (s)skipped, (x)failed, (X)passed, (p)passed, (P)passed with output, (a)all except pP.
--disable-warning ,disable warnings summary
-l ,show locals in tracebacks (disabled by default)
--tb=style,traceback print mode (auto/long/short/line/native/no).
--tb=no
--full-trace don't cut any tracebacks (default is to cut).
--color=color color terminal output (yes/no/auto).
--color=no
--junit-xml=path , create junit-xml style report file at given path.
--html=path , create html report file at given path.