[
https://issues.apache.org/jira/browse/SUREFIRE-1650?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16960367#comment-16960367
]
Tibor Digana commented on SUREFIRE-1650:
----------------------------------------
This must be user error. See this command
{{mvn test "-Dsurefire.suiteXmlFiles=path/to/suite1.xml,path/to/suite2.xml"}}
There is a rule how not to ask but how to always write successful commandline.
First of all see the list of configuration parameters on the documentation of
Surefire. You will see the parameter {{suiteXmlFiles}} and the {{User
Property}} which is the key for system property.
http://maven.apache.org/surefire/maven-surefire-plugin/test-mojo.html#suiteXmlFiles
and see the documentation for the Faisale and see that we defined another
prefis for the parameter
http://maven.apache.org/surefire/maven-failsafe-plugin/integration-test-mojo.html#suiteXmlFiles
Finally, you can google some exmaple:
https://www.seleniumeasy.com/maven-tutorials/choose-selected-testng-xml-files-to-execute-using-maven
> Running multiple xml using suiteXmlFiles resulting in 0 test count
> ------------------------------------------------------------------
>
> Key: SUREFIRE-1650
> URL: https://issues.apache.org/jira/browse/SUREFIRE-1650
> Project: Maven Surefire
> Issue Type: Bug
> Components: Maven Surefire Plugin, TestNG support
> Affects Versions: 3.0.0-M3
> Reporter: Gavrila Budiwijaya
> Assignee: Tibor Digana
> Priority: Major
> Attachments: Zero Test Count.png
>
>
> POM setup:
> {code:java}
> <plugin>
> <groupId>org.apache.maven.plugins</groupId>
> <artifactId>maven-surefire-plugin</artifactId>
> <version>3.0.0-M3</version>
> <configuration>
> <argLine>
>
> -javaagent:"${settings.localRepository}/org/aspectj/aspectjweaver/${aspectj.version}/aspectjweaver-${aspectj.version}.jar"
> -Dcucumber.options="--plugin
> io.qameta.allure.cucumber4jvm.AllureCucumber4Jvm"
> </argLine>
> <suiteXmlFiles>
> <suiteXmlFile>${suiteXmlFile}</suiteXmlFile>
> </suiteXmlFiles>
> <systemPropertyVariables>
> <config>${config}</config>
> </systemPropertyVariables>
> </configuration>
> </plugin>
> {code}
> Run using command line and multiple xml will results in 0 test count
> {code:java}
> mvn clean test -Dconfig="D:\configs\api\Automation - API - Staging.cfg"
> -DsuiteXmlFile="xml/regression/fintech/TestMain.xml","xml/regression/loyalty/TestMain.xml","xml/regression/payment/TestMain.xml"
> {code}
> The results will display correct counter when I run single xml file.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)