this is from selenium grid. How to write java/C# code to make parallel execution.
Is this enough?
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();
Because when I run http://localhost:4444/console there are 3 Available Remote Controls but 0 Active Remote Controls even if I run code from up.
Code from ant which I do not understand 100%. Why is there parameter
<arg value="-parallel"/>
?
<target name="run-demo-in-parallel" description="Run Selenium tests in parallel">
<java classpathref="demo.classpath"
classname="org.testng.TestNG"
failonerror="true"
>
<sysproperty key="java.security.policy" file="${basedir}/lib/testng.policy"/>
<sysproperty key="webSite" value="${webSite}" />
<sysproperty key="seleniumHost" value="${seleniumHost}" />
<sysproperty key="seleniumPort" value="${seleniumPort}" />
<sysproperty key="browser" value="${browser}" />
<arg value="-d" />
<arg value="${basedir}/target/reports" />
<arg value="-suitename" />
<arg value="Selenium Grid Demo In Parallel" />
<arg value="-parallel"/>
<arg value="methods"/>
<arg value="-threadcount"/>
<arg value="10"/>
<arg value="-testclass"/>
<arg value="com.thoughtworks.selenium.grid.demo.WebTestForASingleBrowser"/>
</java>
</target>