Pytest- heavy operation mechanism

First, install

pip install pytest-rerunfailures

Second, run

Command line parameters: pytest - reruns retries (--reruns- interval between times Delay) 
                  pytest --reruns 2 fail with Example 2 may be performed 
                  pytest --reruns --reruns 2. 5-Delay  with embodiments of fail may be performed two times, each time interval of 5 seconds 
pytest.main ([ " -v " , " -m " , " Demo " , " --reruns " , " 2 " , " --reruns " , " -delay " , " . 5 " , " --alluredir = ../OutPuts/allure-results"])

 

Third, the effect of:

Set of use cases failed to run again

Guess you like

Origin www.cnblogs.com/minghong/p/11896188.html