3

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:

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

There are several solutions that add parallelization to JUnit:

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

0

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, privacy policy and cookie policy

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