Enrico is right. Surefire does NOT execute 3 Maven modules in parallel. Opposite! One module executes Surefire which divides the test into 3 additional JVMs and the Surefire (module) is waiting for their completion.
On Thu, Apr 9, 2020 at 1:09 PM Debraj Manna <[email protected]> wrote: > > Hi > > I am reading the maven surefire documentation > <https://maven.apache.org/surefire/maven-surefire-plugin/examples/fork-options-and-parallel-execution.html> > about > the forked test execution. It states > > *The default setting is forkCount=1/reuseForks=true, which means that > maven-surefire-plugin creates one new JVM process to execute all tests in > one Maven module.* > > *forkCount=1/reuseForks=false executes each test class in its own JVM > process, one after another. It creates the highest level of separation for > the test execution, but it would probably also give you the longest > execution time of all the available options. Consider it as a last reso*rt. > > > Can someone resolve my below doubts about the above para: > > In a maven multimodule project if I am setting forkcount=3 / > reuseForks=true. Then does that mean maven-surefire-plugin will create 3 > new JVM processes and then execute tests from 3 modules in 3 JVM and all > tests from a module will be running in the same JVM? -- Cheers Tibor --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
