You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Kamalpreet Kaur <km...@gmail.com> on 2022/11/29 10:53:08 UTC

Injecting JUnit-4 Parallel Execution Parameters in Surefire Plugin

Hi Everyone,

I'm currently creating a package from where I would want to set JUnit
parallel execution parameters like below :

*<parallel>classesAndMethods</parallel>
<threadCountClasses>1</threadCountClasses>
<threadCountMethods>1</threadCountMethods>
<perCoreThreadCount>false</perCoreThreadCount>*

I'm planning to use Instrumentation API to inject these parameters. I tried
to find the correct place where I can do so, but failed to find one.

Please point me to a class from where these values are being honoured So
that I could inject these parameters there. You could also suggest a way to
set these values apart from adding them to the <configuration> element.

I tried intercepting different surefire classes like ForkedBooter,
JUnit4Provider, JUnitCoreProvider but after that the execution didn't
happen according to specified parameters.

--
Thanks & Regards
Kamalpreet Kaur