JUnit, test and threads

when I run several JUnit tests on a line, does JUnit make a new thread for each run or is it all wrapped in a single thread?

thanks

+4
source share
2 answers

All this in one thread. You do not say how you call the tests, but, for example, running TestSuite will run all the tests in the package sequentially.

If you need parallel execution, TestNG supports the simultaneous execution of tests, as well as JUnitPerf and GroboUtils .

+5
source

JUnit 4.0 supports parallel tests

+3
source

Source: https://habr.com/ru/post/1309126/


All Articles