Search code examples
javamavenjunitjunit5spring-test

Is there a way to configure JUnit 5 thread count using a command line argument?


Currently, to set the thread count, I have to update the following property inside junit-platform.properties file:

junit.jupiter.execution.parallel.config.fixed.parallelism=5

Is there a way to configure the thread count using a command line argument?


Solution

  • Thanks @Slaw. The following command works like a charm:

    mvn clean -Djunit.jupiter.execution.parallel.config.fixed.parallelism='10' test