0

I want to test my JUnit test cases from multiple threads to check how my functionality works in multi-threaded env. TestNG has a nice way to do it @Test(invocationCount = 100, threadPoolSize = 10). How can I do similar in JUnit.

Thanks, NN

Niranjan
  • 2,601
  • 8
  • 43
  • 54
  • 1
    Not sure how to accomplish this with junit, but I would create a unit test using an `ExecutorService` and sending lot of `Runnable` object instances where each one performs the desired method. – Luiggi Mendoza Feb 07 '14 at 20:23
  • 1
    Also, since it looks you want to execute performance and/or stress testing, you should read this: http://stackoverflow.com/q/504103/1065197. – Luiggi Mendoza Feb 07 '14 at 20:25

0 Answers0