sormuras / junit-platform-maven-plugin

Maven Plugin launching the JUnit Platform
Apache License 2.0
61 stars 15 forks source link

How to run tests in separate threads #110

Open nilic10 opened 1 year ago

nilic10 commented 1 year ago

Hi,

I'm running my selenium tests in parallel, with following configuration: junit.jupiter.execution.parallel.enabled = true junit.jupiter.execution.parallel.mode.classes.default = concurrent junit.jupiter.execution.parallel.config.strategy = fixed junit.jupiter.execution.parallel.config.dynamic.factor = 40 junit.jupiter.execution.parallel.config.dynamic.max-pool-size-factor = 40

I noticed that all tests are run in the same java thread. Is there some java option for running tests in separate threads ( something like threadCount or unlimitedThreads options on maven surefire)

sormuras commented 1 year ago

Does this help? https://junit.org/junit5/docs/current/user-guide/#writing-tests-parallel-execution

Seems like junit.jupiter.execution.parallel.mode.default is not configured in your setup, therefore still defaults to same_thread.

nilic10 commented 1 year ago

No, the same result if I add junit.jupiter.execution.parallel.mode.default = concurrent