In our project I have several JUnit tests that e.g. take every file from a directory and run a test on it. If I implement a testEveryFileInDirectory
method in t
Should be possible in JUnit 3 by inheriting from TestSuite
and overriding the tests()
method to list the files and for each return an instance of a subclass of TestCase
that takes the filename as constructor parameter and has a test method that tests the file given in the constructor.
In JUnit 4 it might be even easier.