title: Maven skips tests specified in Cucumber runner, but if I run through testng they run successful
body: <p>Using TestNG and Maven to run my Cucumber features. When running through Maven (mvn test) it just skips tests: <code>Tests run: 1, Failures: 0, Errors: 0, Skipped: 1, Time elapsed: 2.071 sec - in TestSuite</code>
  But when running without Maven (simple running testngCucumber.xml file) it runs successfully.
  Also when running TestRunner file it runs successfully.
  Would appreciate any of why it could be happenning.</p>
  <p>Pom.xml</p>
  <pre><code>&lt;groupId&gt;com.moodys.act&lt;/groupId&gt;
  &lt;artifactId&gt;ACT.TestAutomation&lt;/artifactId&gt;
  &lt;version&gt;0.0.1-SNAPSHOT&lt;/version&gt;
  &lt;packaging&gt;jar&lt;/packaging&gt;
  
  &lt;name&gt;ACT.TestAutomation&lt;/name&gt;
  &lt;url&gt;http://maven.apache.org&lt;/url&gt;
  
  &lt;properties&gt;
      &lt;project.build.sourceEncoding&gt;UTF-8&lt;/project.build.sourceEncoding&gt;
  &lt;/properties&gt;
  
  &lt;build&gt;
      &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.19.1&lt;/version&gt;
  
              &lt;configuration&gt;
                  &lt;suiteXmlFiles&gt;
                      &lt;suiteXmlFile&gt;testngCucumber.xml&lt;/suiteXmlFile&gt;
                  &lt;/suiteXmlFiles&gt;
              &lt;/configuration&gt;
          &lt;/plugin&gt;
      &lt;/plugins&gt;
  &lt;/build&gt;
  
  &lt;dependencies&gt;
  
      &lt;!-- https://mvnrepository.com/artifact/org.seleniumhq.selenium/selenium-java --&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.seleniumhq.selenium&lt;/groupId&gt;
          &lt;artifactId&gt;selenium-java&lt;/artifactId&gt;
          &lt;version&gt;3.141.59&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.testng&lt;/groupId&gt;
          &lt;artifactId&gt;testng&lt;/artifactId&gt;
          &lt;version&gt;6.8&lt;/version&gt;
          &lt;scope&gt;test&lt;/scope&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;log4j&lt;/groupId&gt;
          &lt;artifactId&gt;log4j&lt;/artifactId&gt;
          &lt;version&gt;1.2.17&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;!-- https://mvnrepository.com/artifact/commons-io/commons-io --&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;commons-io&lt;/groupId&gt;
          &lt;artifactId&gt;commons-io&lt;/artifactId&gt;
          &lt;version&gt;2.6&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.apache.poi&lt;/groupId&gt;
          &lt;artifactId&gt;poi-ooxml&lt;/artifactId&gt;
          &lt;version&gt;3.17&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.apache.pdfbox&lt;/groupId&gt;
          &lt;artifactId&gt;pdfbox&lt;/artifactId&gt;
          &lt;version&gt;2.0.6&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;!-- https://mvnrepository.com/artifact/info.cukes/cucumber-testng --&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;info.cukes&lt;/groupId&gt;
          &lt;artifactId&gt;cucumber-testng&lt;/artifactId&gt;
          &lt;version&gt;1.2.5&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;!-- https://mvnrepository.com/artifact/info.cukes/cucumber-java --&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;info.cukes&lt;/groupId&gt;
          &lt;artifactId&gt;cucumber-java&lt;/artifactId&gt;
          &lt;version&gt;1.2.5&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;!-- https://mvnrepository.com/artifact/org.apache.maven.plugins/maven-surefire-plugin --&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
          &lt;artifactId&gt;maven-surefire-plugin&lt;/artifactId&gt;
          &lt;version&gt;2.19.1&lt;/version&gt;
      &lt;/dependency&gt;
  
  
  &lt;/dependencies&gt;
  </code></pre>
  
  <p>testngCucumber.xml</p>
  <pre><code>    &lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
  &lt;!DOCTYPE suite SYSTEM &quot;https://testng.org/testng-1.0.dtd&quot;&gt;
  &lt;suite name=&quot;Suite&quot;&gt;
  
    &lt;test thread-count=&quot;5&quot; name=&quot;Test&quot;&gt;
      &lt;classes&gt;
        &lt;class name=&quot;com.act.runner.TestRunner&quot;/&gt;
      &lt;/classes&gt;
    &lt;/test&gt; &lt;!-- Test --&gt;
    
  &lt;/suite&gt; &lt;!-- Suite --&gt;
  </code></pre>
  <p>TestRunner:</p>
  <pre><code>    @CucumberOptions(features = &quot;src/test/java/com/act/features&quot;, glue = &quot;com/act/steps&quot;, tags = { &quot;@ACT0001&quot; })
  
  public class TestRunner extends AbstractTestNGCucumberTests {
  }
  </code></pre>
  <p><a href="https://i.stack.imgur.com/PBreq.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/PBreq.png" alt="enter image description here" /></a></p>