Bug 298061

Summary: [JUnit] allow running Tests in separate JVMs (fork=true)
Product: [Eclipse Project] JDT Reporter: alexander golubev <golubec>
Component: UIAssignee: JDT-UI-Inbox <jdt-ui-inbox>
Status: ASSIGNED --- QA Contact:
Severity: enhancement    
Priority: P5 CC: bindulbhowmik, gautier.desaintmartinlacaze, golubec, markus.kell.r, schauer
Version: 3.6   
Target Milestone: ---   
Hardware: PC   
OS: Windows Vista   
Whiteboard:

Description alexander golubev CLA 2009-12-17 06:20:17 EST
Build Identifier: M20090917-0800

It's common case when ant script has fork=true for junit task. Not all of tests in a project are written by qualified test writers , so the exectuion context can be polluted with different stuff. 

If you need to just run tests without fixing or correcting them to properly use setUp() and tearDown() - such option like fork=true would be very useful.

Reproducible: Always

Steps to Reproduce:
1.Go Windows->Preferences->Java->Junit
2.No preferences for Junit is available except "Stack trace filter patterns"
Comment 1 Frederic Fusier CLA 2009-12-17 07:05:05 EST
Move to JDT/UI
Comment 2 Markus Keller CLA 2010-01-25 08:18:02 EST
We won't add a global option for this, but it could maybe be added to the JUnit launch configuration dialog.

However, it's not clear with what granularity test should be split up to VMs. In Ant, you can control this via <batchtest> elements. In Eclipse, we don't have a UI to configure individual tests.
Comment 3 Bindul Bhowmik CLA 2015-12-29 20:30:09 EST
Hello,

This would be a very welcome enhancement if implemented. It leaves me in a situation with a project where I am unable to run all tests within a project from the same Run Configuration (has to do with derby instances and derby system being persistent on a JVM) within Eclipse. I can however successfully run the tests from Maven (command line).

If there is interest, the fork logic could be implemented like Maven Surefire Plugin (see https://maven.apache.org/surefire/maven-surefire-plugin/examples/fork-options-and-parallel-execution.html).

Bindul