Ant Junit ForkMode with Suites

21 views Asked by At

I am running GUI-tests with JAssert-swing, and want to have each testclass has it's own VM.

The test-classes are bundled as usual:

@RunWith(Categories.class)
@SuiteClasses({

    Test1.class,
    Test2.class

})
public class TestSuite{
...

When I use use forkMode=perTest in Ant, the tests still gets executed in the same VM. I searched for infos and didn't find much - ChatGpt says:

JUnit treats the execution of a suite as a single test case in terms of forking behavior. This means that for the entire suite TestSuite, which includes Test1and Test2, a single JVM is launched, not a separate one for each test case within the suite.

How is the typical workflow here? How can I achieve my goal?

0

There are 0 answers