Selenium Forum: Functional And Regression Testing Tool.
Would you like to react to this message? Create an account in a few clicks or log in to continue.
Search
Display results as :
Advanced Search
Latest topics
AEM Training | Free Online DemoWed Apr 21, 2021 5:45 pmazharuddin
c# PageFactory - issue initializing elementsFri Nov 01, 2019 8:40 pmthegoatboy
Selenium making automatic connection to random urlsMon Jul 08, 2019 12:58 pmrepairtechsolutions1
How can we design the custom framework in Selenium RCMon Jun 24, 2019 2:26 pmrandybonnettes
What are the new features in Selenium 3.0Tue Jun 18, 2019 5:37 pmpappyvicky
What are you using Selenium for? Fri Apr 12, 2019 3:52 amzhl
LIMITATIONS OF SELENIUMWed Apr 10, 2019 11:23 amswara
Navigation
 Portal
 Index
 Memberlist
 Profile
 FAQ
 Search

Go down
avatar
manvya
Posts : 3
Join date : 2011-08-31

How to Set up Grid 2 in selenium RC using TestNG for executing Tests Parallel? Empty How to Set up Grid 2 in selenium RC using TestNG for executing Tests Parallel?

Thu Dec 08, 2011 8:14 pm
Hi,
I have done the following process to make the RC work as Grid for Parallel execution in TestNG:

I have downloaded the selenium-server-standalone-2.1.0.jar. Also I have my TestNG test cases.

And i have a test xml like :
test name="FFTest" preserve-order="true"
parameter name="selenium.host" value="localhost">
parameter name="selenium.port" value="5569">
parameter name="selenium.browser" value="*firefox">
parameter name="selenium.url" value="http://www.google.com">
classes

class name="EmployeeHealth.TestScripts.EmployeeHealthRegressionSuite"
methods>
include name="InitScript">
include name="SelectAvoidableAdmissionModule">
methods>
class>


classes>
test> test name="IETest" preserve-order="true"
parameter name="selenium.host" value="localhost">
parameter name="selenium.port" value="5579">
parameter name="selenium.browser" value="*iehta">
parameter name="selenium.url" value="http://www.google.com">
classes

class name="EmployeeHealth.TestScripts.EmployeeHealthRegressionSuite"
methods>
include name="InitScript">
include name="SelectAvoidableAdmissionModule">
methods>
class>


classes>
test>


And I followed the below steps:

Start Hub:
java -jar selenium-server-standalone-2.5.0.jar -role hub

Start remote control supporting Firefox
java -jar selenium-server-standalone-2.5.0.jar -role RC -hub http://localhost:4444/grid/register -browser browserName=firefox,platform=WINDOWS -port 5579

Start another RC supporting Internet explore
java -jar selenium-server-standalone-2.5.0.jar -role RC -hub http://localhost:4444/grid/register -browser browserName=iexplore,platform=WINDOWS -port 5556.

And in my SetUp.java file, Am creating the selenium objects like:
selenium = new DefaultSelenium(host,Integer.parseInt(port),
browser, url);


if ( browser.equalsIgnoreCase("*chrome")) {
RemoteControlConfiguration rcc = new RemoteControlConfiguration();
rcc.setFirefoxProfileTemplate(new File(
"test\\Resources\\ThirdParty\\FirefoxProfile\"));
seleniumServer = new SeleniumServer(rcc);

} else {
RemoteControlConfiguration rcc = new RemoteControlConfiguration();
rcc.setFirefoxProfileTemplate(new File("Object Repository\\SSL"));
//"src\\Script\\lib\\ThirdParty\\FirefoxProfile\"));C:\\Biju\\NewFrameworkStrcuture\\Framework\\ABC_JSAF\\

seleniumServer = new SeleniumServer(rcc);
RemoteControlConfiguration a= seleniumServer.getConfiguration();
File uimap=new File("src\\Script\\lib\\user-extensions.js");
a.setUserExtensions(uimap);
//seleniumServer = new SeleniumServer();
}
http://seleniumServer.start();
selenium.start();
selenium.windowMaximize();
selenium.windowFocus();

By this way, when am running the xml file, the tests are running in sequence(First Firefox and then the IE). But not in parallel.

Also i tried giving the @Test parameter like
@Test(dataProvider="CommonTestData",threadPoolSize = 3)

But i dont see any change in the seqence.

do any one got why this is happening?..

Appreciate for your help.


Back to top
Permissions in this forum:
You cannot reply to topics in this forum