title: Selenium Webdriver JUNIT Maven Eclipse Running Test Cases fails
body: <p>I am trying to run test cases using JUNIT 4.10 with Selenium for a Web Application using Maven in Eclipse. </p>
  
  <p>I have created a simple java project with JUNIT Test cases added proper dependency.
  It works perfectly fine with <code>Run as a JUNIT Test case</code> but it does not work as Maven Test so something like <code>mvn clean test</code> is not working. </p>
  
  <p>Here is my excerpt of pom.xml </p>
  
  <pre><code>    &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.12.4&lt;/version&gt;
      &lt;/plugin&gt;
  &lt;/plugins&gt;
  </code></pre>
  
  <p></p>
  
  <pre><code>&lt;dependencies&gt;
  &lt;dependency&gt;
    &lt;groupId&gt;junit&lt;/groupId&gt;
    &lt;artifactId&gt;junit&lt;/artifactId&gt;
    &lt;version&gt;4.10&lt;/version&gt;
    &lt;scope&gt;test&lt;/scope&gt;
  &lt;/dependency&gt;
  &lt;dependency&gt;
    &lt;groupId&gt;org.apache.poi&lt;/groupId&gt;
    &lt;artifactId&gt;poi&lt;/artifactId&gt;
    &lt;version&gt;3.8&lt;/version&gt;
    &lt;scope&gt;compile&lt;/scope&gt;
  &lt;/dependency&gt;
  &lt;dependency&gt;
      &lt;groupId&gt;org.seleniumhq.selenium&lt;/groupId&gt;
      &lt;artifactId&gt;selenium-java&lt;/artifactId&gt;
      &lt;version&gt;2.25.0&lt;/version&gt;
      &lt;type&gt;jar&lt;/type&gt;
      &lt;scope&gt;test&lt;/scope&gt;
  &lt;/dependency&gt;
  </code></pre>
  
  <p></p>
  
  <p>also here is my JUnit Test case which I wrote, </p>
  
  <pre><code>@Test()
  public void testTC101() throws InterruptedException{
      driver.get(ADMIN_BASE_URL_QA);
      driver.manage().timeouts().implicitlyWait(12, TimeUnit.SECONDS);
      driver.findElement(By.xpath("//*[@id='top30Events']"));
      WebElement loanModFullEvent = driver.findElement(By.partialLinkText(QA_MOD_FULL_EVENT));
      loanModFullEvent.click();
      String clickedFullEventId = loanModFullEvent.findElement(By.xpath("..")).getAttribute("id").split("_")[1];
      List&lt;WebElement&gt; nearbyEvents = driver.findElements(By.id("nearby_events_" + clickedFullEventId));
      ListIterator&lt;WebElement&gt; wIterator = nearbyEvents.listIterator();
      WebElement element = null;
      String registerNowId = null;
      while(wIterator.hasNext()) {
          element = wIterator.next().findElement(By.linkText(QA_MOD_NONFULL_EVENT));
          element.click();
          registerNowId = element.getAttribute("onclick").replaceAll("\\D+", "");
      }
      registerNowId = "top30_" + registerNowId;
      driver.findElement(By.xpath("//*[@id='" + registerNowId + "']/div[3]/div/a")).click();              
      WebElement dropDownListBox = driver.findElement(By.xpath("//*[@id='list']"));
      Select clickThis = new Select(dropDownListBox);
      clickThis.selectByValue("mod");
      driver.findElement(By.xpath("//*[@id='situationdropdown']/div/div/div[1]/span/span/span/input")).click();
      RegistrationForm.fillFormAndSubmit();
  
  }
  </code></pre>
  
  <p>Code is just for the idea, but the problem is It is running in JUnit Test case why not using maven. It says tests : 0 runs : 0 skips : 0</p>
  
  <p>Why it is not recognizing the tests, I am still not sure why? Can someone help?</p>