I am using Surefire Plugin, and I have a suite like this:
<suiteXmlFiles>
<suiteXmlFile>src/test/resources/suites/testng1.xml</suiteXmlFile>
<suiteXmlFile>src/test/resources/suites/testng2.xml</suiteXmlFile>
</suiteXmlFiles>
If I execute this command:
mvn clean test
then both xml files are executed. Now I want to run only testng2.xml
, so I specify its path in this command:
mvn clean test -Dsurefire.suiteXmlFiles=/src/test/resources/suites/testng2.xml
but it doesn't work, because both testng1.xml and testng2.xml are again executed.
Am I missing something? I use Maven v3.5. Thanks