Bug 298061 - [JUnit] allow running Tests in separate JVMs (fork=true)
Summary: [JUnit] allow running Tests in separate JVMs (fork=true)
Status: ASSIGNED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.6   Edit
Hardware: PC Windows Vista
: P5 enhancement (vote)
Target Milestone: ---   Edit
Assignee: JDT-UI-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-12-17 06:20 EST by alexander golubev CLA
Modified: 2019-08-20 03:58 EDT (History)
5 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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