I have a few junit tests that take a long time to run. Is it possible to assign a thread to each test to run them concurrently? How would this be done?
Asked
Active
Viewed 1,240 times
1 Answers
2
Yes, You can.
If you are using maven. You can take help of
maven-surefire-plugin
In Spring,
You can check this Link
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.7.1</version>
<configuration>
<parallel>classes</parallel>
<threadCount>5</threadCount>
</configuration>
</plugin>
</plugins>
</build>
Solution 2: Junit4 provides parallel feature using ParallelComputer

VedantK
- 9,728
- 7
- 66
- 71