JUnit 4 multithreaded runners
"Jeffrey Clary" <[email protected]> Mon, 7 May 2007 09:18:22 -0700
| Newsgroups | gmane.comp.java.junit.devel |
|---|---|
| Message-ID | <[email protected]> |
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 ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ Junit-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/junit-devel