Creating a separate process from unit test

I have some unit tests (yes, maybe more tests for integration-ey!) That I would like to deploy another jvm and then run the test code from this β€œother” JVM (and wait for it to complete, collecting the results). I am wondering if there is a simple / reliable way to do this with junit (e.g. inherit the classpath you need, etc.)

Any ideas are appreciated.

+3
source share
3 answers

Ant will do it for you :

<junit fork="yes">
    <jvmarg value="-Djava.compiler=NONE"/>
    ...
</junit>
+1
source

JUnit Tools. .., , .. .

0

Just did it using the methods explained in this question: Running a Java application in a separate process

0
source

Source: https://habr.com/ru/post/1715380/


All Articles