testng icon indicating copy to clipboard operation
testng copied to clipboard

Feature Request: fail fast invocationCount and successPercentage logic

Open yapith opened this issue 10 years ago • 2 comments

There should be an option to not run a test with configured invocationCount and successPercentage when the successPercentage is already met.

For example: if (invocationCount == 2 && successPercentage is 50) then the test should only retry if the first attempt fails.

It answers the question of whether a test meets the desired success rate without consuming additional computing resources.

P.S. This requirement is moot if the invocations are run in parallel. In my case, the integration tests are memory bound that single threaded retry is desired.

yapith avatar Jan 11 '15 02:01 yapith

In the mean time, what is the best work around to achieve the stated problem? I'm currently considering a custom TestRunner implementation. I appreciate the advice.

yapith avatar Jan 11 '15 02:01 yapith

I'm also looking for something similar, but for different reasons: I am chasing a difficult bug where I want to re-run a test 10, 100 or even 1000 times. It's enough to know that it failed one time, I don't need to run the remaining 5, 50 or 500 times (or worse). @yapith did you find a workaround?

perlun avatar Feb 01 '19 14:02 perlun