Does Maven surefire plugin run tests using multiple threads?

前端 未结 4 895
时光说笑
时光说笑 2021-01-04 01:36

I\'m wondering if the Maven surefire plugin either runs tests multi-threaded by default (and if so can the number of threads be controlled? ) or if it runs tests from the Te

4条回答
  •  遥遥无期
    2021-01-04 01:41

    I have found that if you are using the -T option in your maven command, Surefire will then fork into forkCount * number of concurrent processes.

    To make them all run in one process despite having multiple threads specified by -T, you can force forkCount to be 0 by adding the option -Dsurefire.forkCount=0

提交回复
热议问题