Community
Participate
Working Groups
Hi! This feature request is probably not where it should be but it was the best match i could come up with when looking at https://bugs.eclipse.org/bugs/enter_feature.cgi. Please reassign it to where it fits best. I would like the Junit runner which is included in the Eclipse gui to be able to run multiple Junit testcases and/or test classes in parallel. As of Junit 4.7, running tests in parallel works very nicely if you use something like this in your code: Result result = JUnitCore.runClasses(ParallelComputer.classes(), ATest.class, BTest.class); or Result result = JUnitCore.runClasses(ParallelComputer.methods(), ATest.class, BTest.class); I would like to have the same feature available through the Junit Eclipse gui. The immediate benefit for all Junit users in Eclipse would be huge gains in test run time. The user would have the possibility to run the tests the normal way or in parallel. Running the tests in parallel will enforce encapsulation of individual testcases and result in shorter total test duration. Kind regards, Jochen
Probably JDT owns JUnit launchers?
This depends on JUnit 4.7 shipping with Eclipse (see bug 272418)
Jochen, if you could provide a patch that would be great too :)
>This depends on JUnit 4.7 shipping with Eclipse (see bug 272418) I don't think so.
ParallelComputer is in an experimental package, is undocumented, and its superclass explicitly tells that it's not considered stable code. Furthermore, running tests in parallel without any constraints is just doomed to fail. We have no plans to support this at the moment.
>>This depends on JUnit 4.7 shipping with Eclipse (see bug 272418) >I don't think so. OK, I see what you meant (ParallelComputer).
(In reply to comment #5) > Furthermore, > running tests in parallel without any constraints is just doomed to fail. It could be an option on the runner like you have the option to run plugin tests in the UI thread or not, disabled by default. Obviously not all tests are safe to run in parallel (UI tests being an obvious example) but for well encapsulated tests with independent fixtures this shouldn't be a problem. I've had a brief look at the code and I'm not clear that the eclipse junit runner uses the junit code mentioned above in the first place. It looks like there's a lot of code wrapping junit to make the UI work (eg JUnit3TestReference) in which case this might be implementable on top of the junit framework.