Is it possible to tell Maven2 to execute every jUnit test in new JVM instance (fork) in serial mode, i.e. one by one.
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You have to fork the JVM like explained here
It should also be possible by just declaring a Sytem property
As described in the documentation: “always” forks for each test-class. I do not know if the “pertest” setting will fork for each test.
Thanks to @Djebel for pointing out that
forkModeis deprecated now. There is a detailed documentation on “Fork Options and Parallel Test Execution” and how to use the new parametersforkCountandreuseForksand that also includes the following migration tips: