What are the configuration parameters for executing JUnit 5 tests in parallel?
The JUnit 5 parallel execution feature is still in development and has not been released yet. To try the parallel execution feature of JUnit 5, set junit.jupiter.execution.parallel.enabled to true in junit-platform.properties file.
However, the above setting will still execute the test classes and test methods sequentially. You can further control the test execution using the SAME_THREAD and CONCURRENT modes.
Here, the SAME_THREAD (default execution mode) will force the execution in the same thread that the parent uses. Whereas CONCURRENT will execute concurrently unless a resource lock forces execution in the same thread.
Here are the configuration parameters for executing all the JUnit 5 tests in parallel:
junit.jupiter.execution.parallel.enabled = true junit.jupiter.execution.parallel.mode.default = concurrent
Hope it helps!
However, you can further deep dive into executing JUnit 5 tests in parallel: