There are 4 exceptions that nunit uses to report the test result. These are: TimeoutException, AssertException, SuccessException, and IgnoreException. You can use them from your nunit testing functions. I think you could put your test code in a try-catch and catch the nunit assert exception exactly twice. But I must say that, as noted earlier, the need for intermittent failure of the test is a reason for review.
source share