Is it possible to run JUnit Theories in parallel?

There are many questions about how to run JUnit tests on SO in parallel. However, I do not think that this concerns theory. If so already, please accept my apologies and point this ignorant to the right place. :-)

I found this very useful article on how to do this for a Parameterized parameter.

For wanderers of Theory, however, everything is different. It seems that each theory method works single-threaded for all generated combinations. Essentially, little is needed to install a multi-threaded scheduler.

Unfortunately, in my case, it is not practical to use Parameterized - because there are too many permutations that need to be created in advance. And honestly, I would prefer JUnit to do this. :-)

Has anyone already solved this problem?

+4
source share
1 answer

See apidocs for junit-toolbox here for ParallelRunner :

JUnit Theories mileage extension that executes all @Test methods simultaneously. In addition, all @Theory method calls with various parameter assignments are executed simultaneously.

+2
source

All Articles