title: Selenium: method main requires 1 parameters but 0 were supplied in the @Test annotation
body: <p>While executing the script using TestNG, it is skipping the main. Below is a sample code, which is similar to mine. If i remove <code>String[] args</code>, then the code is working with TestNG, but running as java application option is removed. How can i overcome this?</p>
  
  <pre><code>Package tests;
  
  import org.testng.annotations.Test;
  
  @Test
  public class SearchText {
      public void createzoo(String[] args) {  
          String[] elems = {"lion", "tiger", "duck"};  
          System.out.println(elems[0]);
          System.out.println(elems[1]);
          System.out.println(elems[2]);
      }
  }
  </code></pre>