Junit4 test suites work well, but there is a catch:
@RunWith(Suite.class) @Suite.SuiteClasses({ A.class, B.class, ...})
If someone is developing a unit test and forgets to include it in Suite.SuiteClasses, this is obviously a problem.
(this is not a burning issue, since Ant will catch it later, but still)
So, I thought: if you say a “test” folder in an Eclipse project and there are several packages with classes in it - is there a way to include them all automatically in the junit4 test suite?
(yes, you can right-click on the “test” folder and run Run as Junit, but sometimes for some reason it is not possible to run separate tests while they are going individually, so I don’t really trust this solution, plus test suites - These are good toys to play with ;-)).
source share