JUnitParams icon indicating copy to clipboard operation
JUnitParams copied to clipboard

Parallelize test runs

Open ncd7 opened this issue 8 years ago • 5 comments

Could we add a feature for the runner to parallelize test execution (using an executor service based on the available core or whatever policy you deem appropriate)?

I've about 1000 parametrized tests in a single module and while intellij is showing me a total runtime of about 4s, in reality it takes more like 40-50s (i suspect the startup/shutdown harness work, class loading, etc, are at play). These are pure unit tests and do not access outside resources so they are definitely CPU bound and CPU utliziation is only about 30% while running. Suggestions very welcome. Thanks.

ncd7 avatar Jun 15 '16 17:06 ncd7

I found this https://github.com/MichaelTamm/junit-toolbox so now trying to figure out if i can use @Rule so i can make junitparams run with the parallel runner...

EDIT: the only reference to using rules I found is here https://github.com/Pragmatists/JUnitParams/wiki in an entry for Jun 14, 2011: Release 0.3.2 which refers to the docs, so going to try to dig in there.

ncd7 avatar Jun 15 '16 19:06 ncd7

Actually I just saw this: https://github.com/Pragmatists/JUnitParams/issues/13 .... not looking promising. :(

ncd7 avatar Jun 15 '16 23:06 ncd7

Any solutions on how to run parameterized tests in parallel? It takes me around 5 sec to run one iteration of test. Running many iterations is time consuming .

pc-cchandragiri avatar Sep 30 '16 19:09 pc-cchandragiri

We were trying to implement it but with no luck. To be honest I think we'll not implement it. Any support on it from you, who are interested in solution, will be appreciated. Maybe together we will find some quite simple solution for it.

zbychupragmatists avatar Aug 09 '17 16:08 zbychupragmatists

Hi,

I'm interested in working on this. Perhaps we can discuss if this is possible and what are the options.

jslopezgithub avatar Mar 14 '20 13:03 jslopezgithub