pytest测试框架(四)---使用pytest-html生成测试报告

一、pytest-html

1、pytest-html模块用于生成测试报告。

2、使用方法:

pytest 用例.py --html=/路径/report.html

 

3、上面的方法,css是独立的,如果想把css样式合并到html里可以这样执行:

pytest --html=/路径/report.html --self=contained-html

4、报告效果:

猜你喜欢

转载自blog.csdn.net/wxt_hillwill/article/details/114583666