title: How do I run a selenium test using maven from the command line?
body: <p>I currently use Eclipse as my Java IDE and I use Maven. I click the run button and it is able to run a Selenium Java test I wrote.</p>
  
  <p>I then proceeded to install Maven on my local machine.</p>
  
  <p>After going to the directory where my pom.xml file is located.
  I run the command: mvn test</p>
  
  <p>I receive the following results:</p>
  
  <pre><code>[INFO] Scanning for projects...
  [INFO]
  [INFO] Using the builder org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBu
  ilder with a thread count of 1
  [INFO]
  [INFO] ------------------------------------------------------------------------
  [INFO] Building SeleniumWebDriver 0.0.1-SNAPSHOT
  [INFO] ------------------------------------------------------------------------
  [INFO]
  [INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ SeleniumWebDriver ---
  [WARNING] Using platform encoding (Cp1252 actually) to copy filtered resources, i.e. build is platfo
  rm dependent!
  [INFO] Copying 0 resource
  [INFO]
  [INFO] --- maven-compiler-plugin:2.5.1:compile (default-compile) @ SeleniumWebDriver ---
  [INFO] Nothing to compile - all classes are up to date
  [INFO]
  [INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ SeleniumWebDriver ---
  [WARNING] Using platform encoding (Cp1252 actually) to copy filtered resources, i.e. build is platfo
  rm dependent!
  [INFO] Copying 0 resource
  [INFO]
  [INFO] --- maven-compiler-plugin:2.5.1:testCompile (default-testCompile) @ SeleniumWebDriver ---
  [INFO] Nothing to compile - all classes are up to date
  [INFO]
  [INFO] --- maven-surefire-plugin:2.12.4:test (default-test) @ SeleniumWebDriver ---
  [INFO] ------------------------------------------------------------------------
  [INFO] BUILD SUCCESS
  [INFO] ------------------------------------------------------------------------
  [INFO] Total time: 1.139 s
  [INFO] Finished at: 2014-03-17T14:12:27-05:00
  [INFO] Final Memory: 12M/99M
  [INFO] ------------------------------------------------------------------------
  </code></pre>
  
  <p>I do not understand why the Firefox webbrowser does not start, and a test is ran. When running the same test in the Eclipse IDE the Firefox webBrowser does start.</p>
  
  <p>It seems to compile fine, but it is for some reason not testing or kicking off the browser when it has the .class files after compilation.</p>
  
  <p>here is a copy of my pom.xml file:</p>
  
  <pre><code>&lt;project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"&gt;
    &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
    &lt;groupId&gt;SeleniumWebDriver&lt;/groupId&gt;
    &lt;artifactId&gt;SeleniumWebDriver&lt;/artifactId&gt;
    &lt;version&gt;0.0.1-SNAPSHOT&lt;/version&gt;
    &lt;dependencies&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.40.0&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.seleniumhq.selenium&lt;/groupId&gt;
          &lt;artifactId&gt;selenium-firefox-driver&lt;/artifactId&gt;
          &lt;version&gt;2.40.0&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.seleniumhq.selenium&lt;/groupId&gt;
          &lt;artifactId&gt;selenium-server&lt;/artifactId&gt;
          &lt;version&gt;2.40.0&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;junit&lt;/groupId&gt;
          &lt;artifactId&gt;junit&lt;/artifactId&gt;
          &lt;version&gt;4.11&lt;/version&gt;
      &lt;/dependency&gt;
    &lt;/dependencies&gt;
  &lt;/project&gt;
  </code></pre>