title: How to implement and run cucumber test files using testng
body: <p>Trying to implement selenium + Cucumber + Testng instead of Junit.</p>
  
  <p>My queries are </p>
  
  <ol>
  <li>What is the alternate for @Runwith(Cucumber.class) in testng </li>
  <li>How to run the class file which contains the path to feature file</li>
  </ol>
  
  <hr>
  
  <pre><code>package runner;
  
  import cucumber.api.CucumberOptions;
  import cucumber.api.testng.AbstractTestNGCucumberTests;
  
  
  @CucumberOptions(features="src/main/java/testCases/Cucumber/Login_Cucumber.Feature",glue="")
  public class TestRunner extends AbstractTestNGCucumberTests {
  
  }
  </code></pre>
  
  <hr>
  
  <p><a href="https://i.stack.imgur.com/iIxDT.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/iIxDT.png" alt="run with testng/cucumber are not appearing"></a></p>