I have a csv test data file with 50+ test data in it. I want my JUnit test to process these 50+ test data in parallel than serially. How can we do that? Is there a framework that can do that?

Junit test:

@FileParameters(value = "classpath:csvFileName.csv", mapper = CsvWithHeaderMapper.class)
public void testData(parameters)
  //code to test

3 Answers 3


The question is quite old but for the people who faces similar problems there are some good news. JUnit5 supports parallel test run out of the box. Such execution works with data providers so parallel threads would use their own particular pieces of data.

Here are some refs:


There are several solutions that add parallelization to JUnit:

However, I'm not sure how they work with .csv files.


By default I believe it runs tests sequentially.

JUnit 4.6 introduced an experimental ParallelRunner to run tests in parallel - I don't know of its current status. I would expect parallelism to remain an "opt-in" feature by default though. (Judging by other answers, it looks like this is now here to stay but in a slightly different form - and still opt-in.)

Good Luck

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.