From: Tim M. <tm...@un...> - 2013-04-10 00:00:55
|
On 10/04/13 03:18, Anthony Hall wrote: > That is an interesting observation! I am reading myself online now that > JUnit does run tests in an arbitrary order.. I did have the same > assumption as you. > I knew that junit reserved the right to run tests in any order, but I did not realise it would change from run to run. Very strange. I can see the value in have random sequences: if you have independent tests, they should run in any order, so trying different sequences each time give you different tests; but one would think that should be an option you have to turn *on*, rather than off. That makes it incredibly hard to replicate when tests fail. > Bizarre, isn’t it? I particularly like the doctrinaire ignorance of “of > course your tests should be totally independent” – what world do these > people live in? > Yes, a rule of thumb that is a worthwhile goal, but some people are too dogmatic about it -- the Junit authors especially. TestNG supports test dependencies well. I also recall reading a while ago that someone had contributed something to Junit to do this, mainly to stop tests running if other tests has failed to prevent cascading failures. I don't have the details handy. It's good to see some activity on this mailing list! And that a lot of work is still happening on the project :) Cheers, Tim |