mardi 24 novembre 2015

How to re-run Failed Test and set re-tries for python3 py.test

I have few web service related test which sends http requests and the response is verified by py.test test cases. I usually get 1 or 2 failures out of 50 tests which are fails due to intermittent slow web server response gathering or due to network.

Is there a way I can re-run or add number of retires to a py.test test case before actually marking it as a Failed one ? Something like run a test 3 times before marking it as failure and moving to the next one, If test passes in any attempt(1 or 2 or in 3) mark it as passed ?

Aucun commentaire:

Enregistrer un commentaire