Parallel Execution for JUnit 5 tests


I am trying to execute JUnit 5 tests in parallel using the maxParallelForks attribute without success, as the tests stubbornly continue to run in serial. I’ve also tried to use the max-workers attribute alongside maxParallelForks, but that didn’t work either.
Is this supposed to work (especially considering that the JUnit platform support has been added quite recently) and, if yes, can you point me to what am I doing wrong? My current configuration:

test  {
    maxParallelForks = 4

    testLogging {
   		events 'passed', 'skipped', 'failed'

   	reports {
   		html.enabled = true

Thanks in advance


I have same question. I’m confused that no one responded to this question. Parallel test execution with JUnit 5 is at the moment big issue and needs to be solved.

It’s been a while. If you still need help then try this .

systemProperty ‘junit.jupiter.execution.parallel.enabled’, ‘true’
systemProperty ‘junit.jupiter.execution.parallel.mode.default’,‘concurrent’

With maxParallelForks logging seems to work for reports, with junit.jupiter.execution.parallel.enabled=true, reports show logs from random test cases