I am currently working on a Maven project. I chose TestNg to run my unit tests. To run my unit tests in every Maven assembly, I added the maven-surefire-plugin to my pom.xml:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.12</version>
<configuration>
<suiteXmlFiles>
<suiteXmlFile>testsuite-persistence-layer.xml</suiteXmlFile>
</suiteXmlFiles>
</configuration>
</plugin>
In addition, I want to specify the tests that will be executed using TestNg TestSuiteXmlFile. For example, in my pom.xml, I configured the surefire plugin to run the tests defined in an XML file called "testuite-persistence-layer.xml".
The problem is that by default the surefire plugin seems to be looking for this XML file in the root of my project. How can I specify the directory where the surefire plugin should search for TestSuite XML files?
TestNg maven.testng.suitexml.dir, Surefire, , .