I need to run my tests in parallel (JUnit5), but I don't now how to pass parameter into pom.xml as a maven goal.
For this moment I have such configuration for maven-surefire-plugin in my pom.xml, but I would like to pass junit.jupiter.execution.parallel.enabled = true
as a maven goal, for example "parallel=true"
.
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.22.1</version>
<configuration>
<properties>
<configurationParameters>
junit.jupiter.execution.parallel.enabled = true
junit.jupiter.execution.parallel.mode.default = concurrent
junit.jupiter.execution.parallel.config.strategy=dynamic
junit.jupiter.extensions.autodetection.enabled = true
</configurationParameters>
</properties>
</configuration>
</plugin>
It can be useful to chose when to run tests in parallel, when to run them in the same thread.
How I can do it? Could you please help me?