title: Eclipse "Run as" does not show "Run as TestNg" option with TestNg installed & all relevant jar files
body: <p>I have <strong>Windows 8.1 64 Bit</strong> in my laptop and I have installed <strong>Eclipse Mars</strong> <code>R-win32-X86-64</code> and <code>jdk-8u71-windowsX64</code>.</p>
  
  <p>Now when I am trying to run simple selenium code ,"Run as" does not show a "Run as TestNg" option. I have already added <strong>TestNg</strong>  and all relevant jar files in my code.<br>
  What can I do to fix this?</p>
  
  <p>My code is below:</p>
  
  <pre><code>package newpkg;
  import java.util.ArrayList;
  import java.util.List;
  import java.util.concurrent.TimeUnit;
  import java.util.Random;
  
  import org.openqa.selenium.By;
  import org.openqa.selenium.WebDriver;
  import org.openqa.selenium.WebElement;
  import org.openqa.selenium.firefox.FirefoxDriver;
  import org.openqa.selenium.support.ui.Select;
  import org.testng.annotations.AfterTest;
  import org.testng.annotations.BeforeTest;
  import org.testng.annotations.Test;
  public class Google {
  
  
      WebDriver driver = new FirefoxDriver();
      String baseurl = "https://www.google.co.in/";
  
      @BeforeTest
      public void initial() {
  
          driver.get(baseurl);
  
      }
  
      @Test
      public void test() {
          driver.findElement(By.xpath("//*[@id='gs_htif0']")).sendKeys("Facebook");
          driver.findElement(By.xpath("//*[@id='sblsbb']")).click();
  
      }
  }
  </code></pre>
  
  <p>I have added TestNG plugin but on running it is showing following errors:</p>
  
  <blockquote>
    <p>-Unknown option: -serport Usage: [-d output-directory] default output directory to : test-output [-testclass list of .class files or list of class names] [-sourcedir a source directory] [-annotations javadoc or JDK] Specifies the default annotation type to be used in suites when none is explicitly specified. This version of TestNG (15) supports both "javadoc" and "JDK" annotation types. [-groups comma-separated list of group names to be run] works only with -testclass</p>
  </blockquote>
  
  <p><strong>Edit:</strong><br>
  I have installed from <a href="http://toolsqa.com/selenium-webdriver/install-testng" rel="nofollow">this link</a> and now Run as > Run as TestNG option is shown. But with error in console which I have posted above and Firefox driver cannot be launched.</p>
  
  <p><strong>Edit2:</strong><br>
  No longer getting the above errors, but am now getting:</p>
  
  <blockquote>
    <p>eclipse.buildId=4.5.0.I20150603-2000 java.version=1.8.0_71 java.vendor=Oracle Corporation BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=en_US Framework arguments: -product org.eclipse.epp.package.jee.product Command-line arguments: -os win32 -ws win32 -arch x86_64 -product org.eclipse.epp.package.jee.product org.eclipse.epp.logging.aeri.ui Warning Sat Feb 20 00:32:02 PST 2016 The notification timed out Version: 1.0.0.v20150617-0732 org.eclipse.epp.internal.logging.aeri.ui.l10n.Logs$LogTraceException at org.eclipse.epp.internal.logging.aeri.ui.l10n.Logs$LogTraceException</p>
  </blockquote>