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

ASF GitHub Bot commented on SUREFIRE-1535:
------------------------------------------

andreybpanfilov commented on issue #190: [SUREFIRE-1535] Surefire unable to run 
testng suites in parallel
URL: https://github.com/apache/maven-surefire/pull/190#issuecomment-404185429
 
 
   > I expected these two FORKTESTSET, TEST_SUITE_XML_FILES been exclusive
   
   According to surefire documentation these to options should be mutually 
exclusive, unfortunately from code perspective they aren't and there is some 
mess in TestNGProvider#invoke (my initial attempt was to change this method, 
but related changes are less straightforward: 
https://github.com/andreybpanfilov/maven-surefire/commit/fb4ea46be677a1eff55c8bf692c6cf9412dd0cbc)
   
   > Question, should be the testSuiteDefinition.getSuiteXmlFiles() be already 
filled up with value and then testSet become null? Here we interchanged these 
two, but mabe the (pre)caller of BooterSerializer should detect this situation 
with XML Suites.
   
   At first glance there is no place where we can modify 
TestRequest#suiteXmlFiles, doing that in ForkStarter#runSuitesForkPerTestSet or 
ForkStarter#fork will cause mutation, cloning is useless because next call is 
BooterSerializer#serialize.
   
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Surefire unable to run testng suites in parallel
> ------------------------------------------------
>
>                 Key: SUREFIRE-1535
>                 URL: https://issues.apache.org/jira/browse/SUREFIRE-1535
>             Project: Maven Surefire
>          Issue Type: Bug
>          Components: TestNG support
>    Affects Versions: 2.22.0
>            Reporter: Andrey Panfilov
>            Priority: Minor
>
> Due to slowness nature of selenium test we would like to run such tests in 
> parallel, moreover, we also would like to avoid thread-safety issues, so our 
> option is to take advantage of  forkCount=N and reuseForks=false instead of 
> using built-in testng capabilities. Unfortunately, when using following maven 
> configuration:
> {code:java}
> <forkCount>2</forkCount>
> <reuseForks>false</reuseForks>
> <suiteXmlFiles>
>     <suiteXmlFile>Suite_1.xml</suiteXmlFile>
>     <suiteXmlFile>Suite_2.xml</suiteXmlFile>
> </suiteXmlFiles>
> {code}
> it does not work like expected, i.e.:
>  * ForkStarter#runSuitesForkPerTestSet correctly spawns multiple JVMs and 
> passes individual testng suite to ForkStarter#fork
>  * TestNGProvider#invoke fails to cover the case that forkTestSet could be a 
> file and runs all testng suites instead of individual one.
>  
>  



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

Reply via email to