用例失败重跑的方法
在用例上添加装饰器@pytest.mark.flaky(reruns=2, reruns_delay=4) reruns为次数,reruns_delay间隔时间,单位s
安装pytest-rerunfailures依赖包,在pytest.ini文件中addopts = 添加参数–reruns n (n:为重试的次数)(有待测试)
pytest失败重跑
原文:https://www.cnblogs.com/crystal1126/p/12580953.html