[ 
https://issues.apache.org/jira/browse/SUREFIRE-1477?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16420055#comment-16420055
 ] 

Tibor Digana commented on SUREFIRE-1477:
----------------------------------------

[~stephenc]
I guess the users can make the same easily with JUnit Suites. For instance:
mvn test -Dtests=TestSuite1 -Dsurefire.runOrder=balanced -Dparallel=classes 
-DthreadCount=4 -DperCoreThreadCount=false

mvn test -Dtests=TestSuite2 -Dsurefire.runOrder=balanced -Dparallel=classes 
-DthreadCount=4 -DperCoreThreadCount=false

mvn test -Dtests=TestSuite3 -Dsurefire.runOrder=balanced -Dparallel=classes 
-DthreadCount=4 -DperCoreThreadCount=false

Actually the config with {{mvnCount}} and {{mvnOffset}} is not easy.

WDYT?

> CI support for parallel test execution
> --------------------------------------
>
>                 Key: SUREFIRE-1477
>                 URL: https://issues.apache.org/jira/browse/SUREFIRE-1477
>             Project: Maven Surefire
>          Issue Type: New Feature
>            Reporter: Stephen Connolly
>            Priority: Major
>
> CI build servers often want to use multiple compute resources to reduce build 
> times in exchange for additional CPU costs.
> One of the biggest consumers of build time is test execution, so much so that 
> people are often willing to run multiple builds in parallel on different 
> machines in order to get the total testing wall clock time lower.
> For example: 
> [https://wiki.jenkins.io/display/JENKINS/Parallel+Test+Executor+Plugin]
> It would be nice if surefire made all this easier and more CI system agnostic.
> We already have some of this available: 
> [https://maven.apache.org/surefire/maven-surefire-plugin/test-mojo.html#runOrder]
>  has the option {{balanced}} that will use a statistics file 
> {{.surefire-XXXXXXXXX}} to distribute tests between different parallel worker 
> threads.
> What is needed to make this better is the ability to use the {{balanced}} run 
> ordering across Maven JVMs.
> If we had two system properties:
>  * {{surefire.mvnCount}}
>  * {{surefire.mvnOffset}}
> Then surefire could use the {{balanced}} run order to deterministically 
> decide the ordered list of tests... it would then start at {{mvnOffset}} and 
> run every {{mvnCount}}th test.
> CI users could then run three maven builds in parallel:
>  * {{mvn -Dsurefire.mvnCount=3 -Dsurefire.mvnOffset=0 test}}
>  * {{mvn -Dsurefire.mvnCount=3 -Dsurefire.mvnOffset=1 test}}
>  * {{mvn -Dsurefire.mvnCount=3 -Dsurefire.mvnOffset=2 test}}
> This would ensure that all the tests are run once, but the wall clock time 
> should be best case approx 1/3th of the wall clock for the full build time
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to