title: Getting No tests to run on executing pom.xml as maven test but on executing testng.xml its working fine
body: <p><strong>Getting No tests to run on executing pom.xml as maven test, but on executing testng.xml its working fine.</strong></p>
  <p><strong>pom.xml - tried including Test case names as well as removing them . nothing is working</strong></p>
  <pre><code>&lt;project xmlns=&quot;http://maven.apache.org/POM/4.0.0&quot; xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot; xsi:schemaLocation=&quot;http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd&quot;&gt;
    &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
    &lt;groupId&gt;webAutomation&lt;/groupId&gt;
    &lt;artifactId&gt;webAutomation&lt;/artifactId&gt;
    &lt;version&gt;0.0.1-SNAPSHOT&lt;/version&gt;
    &lt;build&gt;
      &lt;sourceDirectory&gt;src&lt;/sourceDirectory&gt;
      &lt;plugins&gt;
        &lt;plugin&gt;
          &lt;artifactId&gt;maven-compiler-plugin&lt;/artifactId&gt;
          &lt;version&gt;3.5.1&lt;/version&gt;
          &lt;configuration&gt;
            &lt;source&gt;1.8&lt;/source&gt;
            &lt;target&gt;1.8&lt;/target&gt;
          &lt;/configuration&gt;
        &lt;/plugin&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.14.1&lt;/version&gt;
          &lt;configuration&gt;
            &lt;suiteXMLFiles&gt;
              &lt;suiteXMLFile&gt;testng.xml&lt;/suiteXMLFile&gt;
          &lt;/suiteXMLFiles&gt;
           &lt;configuration&gt;
              &lt;includes&gt;
              &lt;include&gt;ocs_TestCase.TC_001.java&lt;/include&gt;
              &lt;include&gt;ocs_TestCase.TC01_OCS_Search.java&lt;/include&gt;
               &lt;/includes&gt;
            &lt;/configuration&gt;
          &lt;/configuration&gt;
        &lt;/plugin&gt;
      &lt;/plugins&gt;
    &lt;/build&gt;
  </code></pre>
  <p><strong>used Testng.xml file</strong></p>
  <pre><code>&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
  &lt;!DOCTYPE suite SYSTEM &quot;http://testng.org/testng-1.0.dtd&quot;&gt;
  &lt;suite name=&quot;Suite&quot;&gt;
    &lt;test name=&quot;Test&quot;&gt;
      &lt;classes&gt;
        &lt;class name=&quot;ocs_TestCase.TC001&quot;/&gt;
          &lt;class name=&quot;ocs_TestCase.TC01_OCS_Search&quot;/&gt;
       &lt;/classes&gt;
    &lt;/test&gt; &lt;!-- Test --&gt;
  &lt;/suite&gt; &lt;!-- Suite --&gt;
  </code></pre>
  <p><strong>Console log on executing pom.xml as maven test</strong></p>
  <pre><code>   [INFO] No sources to compile
  [INFO] 
  [INFO] --- maven-surefire-plugin:2.14.1:test (default-test) @ webAutomation ---
  [INFO] No tests to run.
  [INFO] ------------------------------------------------------------------------
  [INFO] BUILD SUCCESS
  [INFO] ------------------------------------------------------------------------
  [INFO] Total time: 2.851 s
  [INFO] Finished at: 2021-02-10T17:17:39+05:30
  [INFO] Final Memory: 12M/220M
  [INFO] ------------------------------------------------------------------------
  </code></pre>