Our JUnits take a total of 6 hours to run. Is there an easy way to run 1/n of them on n different machines?
Once parallel test execution property is enabled, the JUnit Jupiter engine will execute tests in parallel according to the provided configuration with declared synchronization mechanisms.
By enabling parallel execution, the JUnit engine starts using the ForkJoin thread pool. Next, we need to add a configuration to utilize this thread pool. We need to choose a parallelization strategy. JUnit provides two implementations (dynamic and fixed) and a custom option to create our implementation.
GridGain (a free cloud implementation) is able to distribute JUnit tests runs across a cluster of nodes. See Distributed JUnit Overview.
Just in case, this is not exactly what you're asking for but TestNG can run tests in parallel (thi would already make your build faster). See Advanced parallel testing with TestNG and data providers.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With