title: Why running Cucumber test with Maven return result "Tests run: 0"?
body: <p>I am using Maven in Eclipse to run Cucumber test. The project structure is as follows:</p>
  
  <p><a href="https://i.stack.imgur.com/QUKbf.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/QUKbf.jpg" alt="enter image description here"></a></p>
  
  <p>I used below Junit runner</p>
  
  <pre><code>@RunWith(Cucumber.class)
  @CucumberOptions(
  features={"src/test/resources/feature"}
  ,glue={"test.java.stepdefinition"}
  )
  public class CucumberJunitTest {
  }
  </code></pre>
  
  <p>The test seems running fine. It's printing the correct log for scenario and steps.</p>
  
  <pre><code>-------------------------------------------------------
   T E S T S
  -------------------------------------------------------
  Running test.java.cucumberjunit.CucumberJunitTest
  a global administrator named
  Successful Login with Valid Credentials: 1
  Successful Login with Valid Credentials: 2
  Successful Login with Valid Credentials: 3
  Successful Login with Valid Credentials: 4
  
  1 Scenarios ([32m1 passed[0m)
  5 Steps ([32m5 passed[0m)
  0m0.206s
  
  Tests run: 0, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.85 sec - in test.java.cucumberjunit.CucumberJunitTest
  
  Results :
  
  Tests run: 0, Failures: 0, Errors: 0, Skipped: 0
  
  [INFO] ------------------------------------------------------------------------
  [INFO] BUILD SUCCESS
  [INFO] ------------------------------------------------------------------------
  [INFO] Total time: 11.794 s
  [INFO] Finished at: 2015-11-26T22:52:07+11:00
  [INFO] Final Memory: 14M/191M
  [INFO] ------------------------------------------------------------------------
  </code></pre>
  
  <p>However, what bothers me is that it says <strong>Tests run: 0,</strong>???</p>
  
  <p>I figured there must be something wrong. But what could be the reason?</p>
  
  <p>BTW, just to verify, i tried to add another TestNG runner in the project:</p>
  
  <pre><code>@CucumberOptions(
  features = {"src/test/resources/feature"}
  ,glue={"test.java.stepdefinition"}
  )
  
  public class CucumberTestNGPest extends AbstractTestNGCucumberTests{
  }
  </code></pre>
  
  <p>and the TestNG runner is printing Tests run: 1 as expected.</p>
  
  <p>Could anyone provide any thoughts? Many thanks.</p>
  
  <p>UPDATE:</p>
  
  <p>To clarify, CucumberJunitTest.java and CucumberTestNGTest.java (In attached screenshot CucumberTestNGTest.java name is changed to CucumberTestNGPest.java so that Surefire will not run it this time) are both Cucumber runners. I do not understand why JUnit test can not give the "Test run: 1" result, where TestNG test can.</p>