title: selenium grid parallel execution
body: <p>this is from selenium grid. How to write java/C# code to make parallel execution. </p>
  
  <p>Is this enough?</p>
  
  <pre><code>ISelenium selenium1 = new DefaultSelenium("localhost", 5555, "*iehta", "http://localhost/");
  ISelenium selenium2 = new DefaultSelenium("localhost", 5556, "*iehta", "http://localhost/");
  ISelenium selenium4 = new DefaultSelenium("localhost", 5557, "*iehta", "http://localhost/");
  
  
  selenium1.Start();
  selenium2.Start();
  selenium3.Start();
  </code></pre>
  
  <p>Because when I run <a href="http://localhost:4444/console" rel="nofollow">http://localhost:4444/console</a> there are 3 Available Remote Controls but 0 Active Remote Controls even if I run code from up.</p>
  
  <p>Code from ant which I do not understand 100%. Why is there parameter<br>
  <code>&lt;arg value="-parallel"/&gt;</code>?</p>
  
  <pre><code>&lt;target name="run-demo-in-parallel" description="Run Selenium tests in parallel"&gt;
      &lt;java classpathref="demo.classpath"
          classname="org.testng.TestNG"
          failonerror="true"
  
          &gt;
        &lt;sysproperty key="java.security.policy" file="${basedir}/lib/testng.policy"/&gt;
        &lt;sysproperty key="webSite" value="${webSite}" /&gt;
        &lt;sysproperty key="seleniumHost" value="${seleniumHost}" /&gt;
        &lt;sysproperty key="seleniumPort" value="${seleniumPort}" /&gt;
        &lt;sysproperty key="browser" value="${browser}" /&gt;
  
        &lt;arg value="-d" /&gt;
        &lt;arg value="${basedir}/target/reports" /&gt;
        &lt;arg value="-suitename" /&gt;
        &lt;arg value="Selenium Grid Demo In Parallel" /&gt;
        &lt;arg value="-parallel"/&gt;
        &lt;arg value="methods"/&gt;
        &lt;arg value="-threadcount"/&gt;
        &lt;arg value="10"/&gt;
        &lt;arg value="-testclass"/&gt;
        &lt;arg value="com.thoughtworks.selenium.grid.demo.WebTestForASingleBrowser"/&gt;
      &lt;/java&gt;
    &lt;/target&gt;
  </code></pre>