Test_Login: (==) (=) (): test.Primary.driver.get() bool_success = LoginSystem(test.Primary.driver).login_openiot() bool_success
用例失败重跑的方法
-
在用例上添加装饰器@pytest.mark.flaky(reruns=2, reruns_delay=4) reruns为次数,reruns_delay间隔时间,单位s
-
安装pytest-rerunfailures依赖包,在pytest.ini文件中addopts = 添加参数–reruns n (n:为重试的次数)(有待测试)
原创文章,作者:奋斗,如若转载,请注明出处:https://blog.ytso.com/187180.html