title: How to run a particular TestNG suite from multiple suites using maven in Jenkins
body: <p>I have a maven project with 3 TestNG suites and 4 test classes, I want to run a specific suite in jenkins, I searched a lot but found only one command to put in goal <code>test -DsuiteXmlFile=Jquery.xml</code> to specify the particular suite but when I do this it runs all the other suites as well. I am stuck here for a long time, Please guide me through the process.
  And also I want to know whether there is any setting I can do so that if I select one suite to run, any particular class of that suite I can run.
  I have attached image of my project structure here, Any input would be appreciated. Thanks :)</p>
  
  <p><a href="https://i.stack.imgur.com/YhUaH.jpg" rel="noreferrer"><img src="https://i.stack.imgur.com/YhUaH.jpg" alt="project structure"></a></p>
  
  <h2>Guru99.xml</h2>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd"&gt;
  &lt;suite name="WebGuru99"&gt;
    &lt;test thread-count="5" name="TestGuru99"&gt;
      &lt;classes&gt;
        &lt;class name="com.selenium.vivek.Example2.WebGuru99_1"/&gt;
        &lt;class name="com.selenium.vivek.Example2.WebGuru99_2"/&gt;
      &lt;/classes&gt;
    &lt;/test&gt; &lt;!-- Test --&gt;
  &lt;/suite&gt; &lt;!-- Suite --&gt;
  </code></pre>
  
  <h2>Jquery.xml</h2>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd"&gt;
  &lt;suite name="WebJquery"&gt;
    &lt;test thread-count="5" name="TestJquery"&gt;
      &lt;classes&gt;
        &lt;class name="com.selenium.vivek.Example2.WebJquery"/&gt;
      &lt;/classes&gt;
    &lt;/test&gt; &lt;!-- Test --&gt;
  &lt;/suite&gt; &lt;!-- Suite --&gt;
  </code></pre>
  
  <h2>Rediff.xml</h2>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd"&gt;
  &lt;suite name="WebRediff"&gt;
    &lt;test thread-count="5" name="TestRediff"&gt;
      &lt;classes&gt;
        &lt;class name="com.selenium.vivek.Example2.WebRediff"/&gt;
      &lt;/classes&gt;
    &lt;/test&gt; &lt;!-- Test --&gt;
  &lt;/suite&gt; &lt;!-- Suite --&gt;
  </code></pre>
  
  <h2>Pom.xml</h2>
  
  <pre><code>&lt;plugins&gt;
          &lt;plugin&gt;
                  &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
                  &lt;artifactId&gt;maven-surefire-plugin&lt;/artifactId&gt;
                  &lt;version&gt;2.18.1&lt;/version&gt;
                  &lt;configuration&gt;
                      &lt;suiteXmlFiles&gt;
                          &lt;suiteXmlFile&gt;Suites/Guru99.xml&lt;/suiteXmlFile&gt;
                          &lt;suiteXmlFile&gt;Suites/Rediff.xml&lt;/suiteXmlFile&gt;
                          &lt;suiteXmlFile&gt;Suites/Jquery.xml&lt;/suiteXmlFile&gt;
                      &lt;/suiteXmlFiles&gt;
                  &lt;/configuration&gt;
              &lt;/plugin&gt;
          &lt;/plugins&gt;
  </code></pre>