The JUnit tests I have are annotated with
@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(locations=...
The chance of each one of the tests, taken individually, to fail is quite low. However, due to the large number of tests, the chance that all of the tests succeed is also low. It is enough that the test succeeds one time to know that the functionality tested was implemented correctly (when the tests fail it is due to some combination of conditions, related to the testing environment, which occur rarely).
So what I need is, for a fixed N, to repeat every test at most N times until success. Only if the test failed all N times, I deduce that something must be broken.
Can one suggest a clean way to implement this (subclassing the Spring JUnit runner, perhaps? some other way?)
Aucun commentaire:
Enregistrer un commentaire