Folks,

 

I have a large body of test cases that ideally I’d like to run in multiple threads.  In JUnit 3.8 I see javadoc for a multithreaded test suite junit.extensions.ActiveTestSuite.  I don’t see anything analogous in JUnit 4.  It seems that in JUnit 4 this really needs to be done as a Runner.

 

I got rough modified versions org.junit.internal.runners.CompositeRunner and org.junit.runners.Parameterized working in multithreaded mode, using a pool of threads to run each test returned by the @Parameters method in a thread.

 

I see a possible thread safety problem in org.junit.runner.notification.RunNotifier.  If a listener throws an exception, the notifier tries to remove it from the listener collection.  I am not sure but I think that this might cause problems when multithreaded.  (I’ve never had a listener throw, however.)

 

I am planning to look at multithreaded versions for some of the other runners.  If anyone else has ideas or is already doing this, please let me know? 

 

Thanks,

Jeff Clary