Test your unit tests + 1 anna
There is no new idea here, however my priliminary search in google did not bring up something similar to what I want to write about.
This is just another observation I had with unit tests (applicable to others as well). When the tests were run in the build all of them passed always. However when I ran a single test there were some unexpected failures.
A close look into the tests revealed that the tests, the faling test had a dependency on some other test runs. Yes they are bad tests and tests are not supposed to be written that way. But they still exist!
Again how can we find them early?
Shuffle the test order. Write a RandomTestRunner Decorator?
BTW we were discussing the Decorator pattern (hammer) today and everythings seems like a nail ;)