Elad Benda2
Elad Benda2

Reputation: 15472

how to turn non-parallel junit parameterized tests into parallel run

I write a parameterized junit test.

Is there any built-in way to make it run in parallel? any @annoation for example?

If not, and my only way is to write this manually -

how would you manage a thread pool in junit, java?

Upvotes: 9

Views: 6661

Answers (1)

Stefan Birkner
Stefan Birkner

Reputation: 24510

The library JUnit Toolbox provides a ParallelParameterized runner. Replace

@RunWith(Parameterized.class)
public class YourTest {

with

@RunWith(ParallelParameterized.class)
public class YourTest {

Upvotes: 18

Related Questions