user2696258
user2696258

Reputation: 1189

Setting number of threads for JUnit execution

Poorly written unit tests are generally affected by the parallelism in JUnit execution. Can setting the number of threads for JUnit helps?

I read it somewhere, but I'm not sure. Can someone tell how can we set it? And where?

Upvotes: 2

Views: 2336

Answers (1)

Kirill Klimchukov
Kirill Klimchukov

Reputation: 31

By defaul jUnit executes @Test methods in 4 threads. Howerver you can increase that number by putting:

junit.jupiter.execution.parallel.config.fixed.parallelism={numberOfThreads}

into:

src/main/resources/junit-platform.properties

Upvotes: 3

Related Questions