I have asked the same in stackoverflow <https://stackoverflow.com/questions/72515006/maven-3-8-difference-between-thread-count-and-forkcount-for-suitsandclasses-para> also. Any one any thoughts?
On Mon, Jun 6, 2022 at 7:25 PM Debraj Manna <subharaj.ma...@gmail.com> wrote: > I read the link > <https://maven.apache.org/surefire/maven-surefire-plugin/examples/fork-options-and-parallel-execution.html> > . > > For parallel = classes, mvn test -T 5 , reuseForks = true & forkCount = 2 > maven will build and run 5 modules in parallel. During the test phase of > each module surefire is getting called and surefire is spawning 2 JVM to > distribute the tests. Once all the tests are finished in module surefire > fork will be termintated. Again a new surefire fork will be created for > executing tests in another module. Only for a module, surefire fork will be > reused. Is my understanding correct? > > What happens for suitesAndClasses? How are the tests distributed? > > > > On Mon, Jun 6, 2022 at 1:19 PM Debraj Manna <subharaj.ma...@gmail.com> > wrote: > >> Hi >> >> I am having a surefire configuration like below >> >> <configuration> >> <forkCount>2</forkCount> >> <reuseForks>true</reuseForks> >> <perCoreThreadCount>false</perCoreThreadCount> >> <parallel>suitesAndClasses</parallel> >> </configuration> >> >> In a multimodule maven project if I am executing mvn test -T 5 then how >> does parallelism work here? Will it be that in surefire fork1 5 tests >> classes will be running in parallel and same in fork2? >> >> Maven Version 3.8.4 >> Surefire version 3.0.0-M6 >> >>