1.pytest中HTML测试报告
安装:pip install pytest-html
使用:在配置文件命令的参数中增加 --html=用户路径/report.html
如:在pytest.ini文件中添加
[pytest]
addopts = --html=./report/report.html
2.pytest中失败重试(失败后再次尝试运行)
安装:pip install pytest-rerunfailures
使用:在配置文件命令的参数中增加--reruns n(n表示重复运行次数),如果期望加上出错重试的灯带时间 --reruns-delay
[pytest]
addopts = --html=./report/report.html --reruns 3 --reruns-delay=2