用例失败重新运行

1、失败重跑需要依赖pytest-rerunfailures插件,安装:pip install pytest-rerunfailures

2、命令行加个参数--reruns就行了,运行: py.test --reruns 1 --html=report.html --self-contained-html

3、运行结果:

原文地址:https://www.cnblogs.com/guo2733/p/10529314.html