SPONSORS:






User Tag List

Thanks Thanks:  0
Likes Likes:  0
Dislikes Dislikes:  0
Page 1 of 2 12 LastLast
Results 1 to 10 of 14
  1. #1
    Advanced Member tarun kumar's Avatar
    Join Date
    Jan 2007
    Location
    Bangalore, India
    Posts
    647
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Parallel run of Tests using TestNG

    I wanted to take advantage of parallel run of tests in TestNG so I could run my tests in different browsers simultaneously using selenium. My testng.xml file is as following -
    //////////////////
    <suite name="SuiteforSeleniumandTestNG" parallel="tests" >

    <parameter name="seleniumserveraddress" value="localhost"/>
    <parameter name="appurl" value="http://www.google.com/"/>
    <!--<parameter name="browserpath" value="*piiexplore"/>-->

    <test name="TestinInternetExplorer">

    <parameter name="browserpath" value="*iehta"/>

    <groups>
    <run>
    <include name="systemtest"/>
    </run>
    </groups>

    <classes>

    <class name="com.testscripts.Google">

    </class>

    </classes>

    </test>

    <test name="TestinFirefox">
    <parameter name="browserpath" value="*chrome"/>
    <classes>
    <class name="com.testscripts.Google">

    </class>
    </classes>
    </test>
    </suite>
    /////////////////////

    My Parent Class is as following -

    ////////////////////
    package com.core;

    import com.thoughtworks.selenium.*;
    import org.testng.annotations.*;
    import org.openqa.selenium.server.SeleniumServer;
    import java.util.Properties;


    public class SelTestCase extends SeleneseTestCase {
    public static String MAX_WAIT_PERIOD = "10000";
    public StringBuffer verificationErrors = new StringBuffer();
    public static Selenium selenium;
    public Properties guimap;

    @BeforeSuite(alwaysRun = true)
    public void startserver() throws Exception {
    SeleniumServer sel = new SeleniumServer();
    sel.start();
    // Uncomment following line if server is to be run in proxy injection mode.
    /*sel.setProxyInjectionMode(true);*/
    }

    @AfterSuite(alwaysRun = true)
    public void stopserver() throws Exception {
    SeleniumServer sel = new SeleniumServer();
    sel.stop();
    }

    @Parameters({"seleniumserveraddress", "browserpath", "appurl"})
    @BeforeClass(alwaysRun = true)

    public void init(String selServerAdd, String browserPath, String appURL) throws Exception {
    selenium = new DefaultSelenium(selServerAdd, SeleniumServer.getDefaultPort(), browserPath, appURL);
    selenium.start();
    /*selenium.open("http://www.google.com/"); */
    }

    @AfterClass(alwaysRun = true)
    public void stop() throws Exception {
    //tearDown();

    selenium.stop();
    /*checkForVerificationErrors();*/
    }

    }
    ////////////////////////

    And Test Class is as following -
    ////////////////////////
    package com.testscripts;

    import com.core.SelTestCase;
    import org.testng.annotations.Test;

    @Test(groups = "systemtest", description = "This is test for cross domains that is moving from http to https to http to https to http.")
    public class Google extends SelTestCase {
    @Test
    public void httpandhtppstest() throws Exception {
    selenium.open("http://www.google.com/");
    selenium.type("q", "Test");
    selenium.click("btnG");
    selenium.waitForPageToLoad("30000");
    assertTrue(selenium.isTextPresent("Tests,"));
    selenium.click("link=Sign in");
    selenium.waitForPageToLoad("30000");
    selenium.type("Email", "tbhadauria@iteamic.com");
    selenium.type("Passwd", "123456!@");
    selenium.click("signIn");
    selenium.waitForPageToLoad("30000");
    assertTrue(selenium.isTextPresent("tbhadauria@itea mic.com"));
    //Thread.sleep(5000);
    selenium.click("link=Sign out");
    selenium.waitForPageToLoad(MAX_WAIT_PERIOD);
    Thread.sleep(5000);
    assertTrue(selenium.isTextPresent("Sign in"));
    //Logging in again

    selenium.click("link=Sign in");
    selenium.waitForPageToLoad("30000");
    selenium.type("Email", "tbhadauria@iteamic.com");
    selenium.type("Passwd", "123456!@");
    selenium.click("signIn");
    selenium.waitForPageToLoad("30000");
    assertTrue(selenium.isTextPresent("tbhadauria@itea mic.com"));
    selenium.click("link=Sign out");
    selenium.waitForPageToLoad(MAX_WAIT_PERIOD);
    }
    }
    ///////////////////////

    When run testng.xml file then it first launches IE in which Google Tests are begun, after a moment Firefox is launched which and after a while both browsers are stopped and exception is thrown at IntelliJ console. below I have copied the exception -

    ///////////////////////
    "C:\Program Files\Java\jdk1.5.0_05\bin\java" -ea -Didea.launcher.port=7537 "-Didea.launcher.bin.path=C:\Program Files\JetBrains\IntelliJ IDEA 6.0\bin" -Dfile.encoding=windows-1252 -classpath "C:\Documents and Settings\tbhadauria\.IntelliJIdea60\config\plugins \testngrunner\lib\testngrunner.jar;C:\Documents and Settings\tbhadauria\.IntelliJIdea60\config\plugins \testngrunner\lib\testng-jdk15.jar;C:\Program Files\Java\jdk1.5.0_05\jre\lib\charsets.jar;C:\Pro gram Files\Java\jdk1.5.0_05\jre\lib\deploy.jar;C:\Progr am Files\Java\jdk1.5.0_05\jre\lib\javaws.jar;C:\Progr am Files\Java\jdk1.5.0_05\jre\lib\jce.jar;C:\Program Files\Java\jdk1.5.0_05\jre\lib\jsse.jar;C:\Program Files\Java\jdk1.5.0_05\jre\lib\plugin.jar;C:\Progr am Files\Java\jdk1.5.0_05\jre\lib\rt.jar;C:\Program Files\Java\jdk1.5.0_05\jre\lib\ext\dnsns.jar;C:\Pr ogram Files\Java\jdk1.5.0_05\jre\lib\ext\localedata.jar; C:\Program Files\Java\jdk1.5.0_05\jre\lib\ext\sunjce_provider .jar;C:\Program Files\Java\jdk1.5.0_05\jre\lib\ext\sunpkcs11.jar;D :\TestHTTPs\classes\test\
    TestHTTPS;D:\TestHTTPs\
    classes\production\TestHTTPS;C:\Program Files\Selenium and other files\testng-5.8\testng-5.8-jdk15.jar;C:\Program Files\Selenium and other files\selenium-remote-control-0.9.2\selenium-server-0.9.2\selenium-server.jar;
    C:\Program Files\Selenium and other files\selenium-remote-control-1.0-beta-1-dist\selenium-remote-control-1.0-beta-1\
    selenium-java-client-driver-1.0-beta-1\selenium-java-client-driver-updated.jar;C:\Program Files\JetBrains\IntelliJ IDEA 6.0\lib\idea_rt.jar" com.intellij.rt.execution.application.AppMain org.testng.remote.RemoteTestNG -port 5390 -sourcedir D:/TestHTTPs/src "C:\Documents and Settings\tbhadauria\.IntelliJIdea60\system\TestHTT PS_SuiteforSeleniumandTestNG_525b41f3.xml"
    [Parser] Running:
    C:\Documents and Settings\tbhadauria\.IntelliJIdea60\system\TestHTT PS_SuiteforSeleniumandTestNG_525b41f3.xml

    16:19:45.745 INFO - Java: Sun Microsystems Inc. 1.5.0_05-b05
    16:19:45.745 INFO - OS: Windows XP 5.1 x86
    16:19:45.745 INFO - v0.9.2 [2006], with Core v0.8.3 [1879]
    16:19:45.854 INFO - Version Jetty/5.1.x
    16:19:45.854 INFO - Started HttpContext[/,/]
    16:19:45.854 INFO - Started HttpContext[/selenium-server,/selenium-server]
    16:19:45.854 INFO - Started HttpContext[/selenium-server/driver,/selenium-server/driver]
    16:19:45.870 INFO - Started SocketListener on 0.0.0.0:4444
    16:19:45.870 INFO - Started org.mortbay.jetty.Server@11b9fb1
    16:19:45.964 INFO - Checking Resource aliases
    16:19:45.979 INFO - Command request: getNewBrowserSession[*chrome, ]http://www.google.com/] on session null
    16:19:45.979 INFO - Command request: getNewBrowserSession[*iehta, ]http://www.google.com/] on session null
    16:19:46.058 INFO - Launching session 585995
    16:19:46.058 INFO - Launching session 585979
    16:19:46.167 INFO - Preparing Firefox profile...
    16:19:46.448 INFO - Launching Embedded Internet Explorer...
    16:19:47.463 INFO - Launching Internet Explorer HTA...
    16:19:48.963 INFO - Launching Firefox...
    16:19:48.979 INFO - Allocated session 585995 for http://www.google.com/
    16:19:49.057 INFO - Got result: OK,585995 on session 585995
    16:19:49.057 INFO - Command request: open[http://www.google.com/, ] on session 585995
    16:19:50.385 INFO - Got result: OK on session 585995
    16:19:50.385 INFO - Command request: type[q, Test] on session 585995
    16:19:50.400 INFO - Got result: OK on session 585995
    16:19:50.400 INFO - Command request: click[btnG, ] on session 585995
    16:19:50.447 INFO - Got result: OK on session 585995
    16:19:50.447 INFO - Command request: waitForPageToLoad[30000, ] on session 585995
    16:19:50.853 INFO - Got result: OK on session 585995
    16:19:50.853 INFO - Command request: isTextPresent[Tests,, ] on session 585995
    16:19:50.916 INFO - Got result: OK,true on session 585995
    16:19:50.916 INFO - Command request: click[link=Sign in, ] on session 585995
    16:19:50.978 INFO - Got result: OK on session 585995
    16:19:50.978 INFO - Command request: waitForPageToLoad[30000, ] on session 585995
    16:19:51.431 INFO - Allocated session 585979 for http://www.google.com/
    16:19:51.462 INFO - Got result: OK,585979 on session 585979
    16:19:51.462 INFO - Command request: open[http://www.google.com/, ] on session 585995
    16:19:51.650 INFO - Got result: ERROR: got a null result on session 585995
    16:19:51.650 INFO - Got result: OK on session 585995
    com.thoughtworks.selenium.SeleniumException: ERROR: got a null result
    at com.thoughtworks.selenium.HttpCommandProcessor.doC ommand(HttpCommandProcessor.java:73)
    at com.thoughtworks.selenium.DefaultSelenium.waitForP ageToLoad(DefaultSelenium.java:526)
    at com.testscripts.Google.httpandhtppstest(Google.jav a:16)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Native MethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(De legatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:585)
    at org.testng.internal.MethodHelper.invokeMethod(Meth odHelper.java:645)
    at org.testng.internal.Invoker.invokeTestMethod(Invok er.java:479)
    at org.testng.internal.Invoker.invokeTestMethods(Invo ker.java:715)
    at org.testng.internal.TestMethodWorker.invokeTestMet hods(TestMethodWorker.java:125)
    at org.testng.internal.TestMethodWorker.run(TestMetho dWorker.java:109)
    at org.testng.internal.thread.ThreadUtil$CountDownLat chedRunnable.run(ThreadUtil.java:132)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run Task(ThreadPoolExecutor.java:650)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:675)
    at java.lang.Thread.run(Thread.java:595)
    16:19:51.666 INFO - Command request: testComplete[, ] on session 585995
    16:19:51.681 INFO - Command request: type[q, Test] on session 585995
    16:19:51.947 INFO - Got result: OK on session 585995
    16:19:52.681 INFO - Got result: ERROR: got a null result on session 585995
    com.thoughtworks.selenium.SeleniumException: ERROR: got a null result
    at com.thoughtworks.selenium.HttpCommandProcessor.doC ommand(HttpCommandProcessor.java:73)
    at com.thoughtworks.selenium.DefaultSelenium.type(Def aultSelenium.java:190)
    at com.testscripts.Google.httpandhtppstest(Google.jav a:11)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Native MethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(De legatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:585)
    at org.testng.internal.MethodHelper.invokeMethod(Meth odHelper.java:645)
    at org.testng.internal.Invoker.invokeTestMethod(Invok er.java:479)
    at org.testng.internal.Invoker.invokeTestMethods(Invo ker.java:715)
    at org.testng.internal.TestMethodWorker.invokeTestMet hods(TestMethodWorker.java:125)
    at org.testng.internal.TestMethodWorker.run(TestMetho dWorker.java:109)
    at org.testng.internal.thread.ThreadUtil$CountDownLat chedRunnable.run(ThreadUtil.java:132)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run Task(ThreadPoolExecutor.java:650)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:675)
    at java.lang.Thread.run(Thread.java:595)
    16:19:52.681 INFO - Command request: testComplete[, ] on session null
    16:19:52.681 INFO - Got result: ERROR: No launcher found for sessionId null on session null
    com.thoughtworks.selenium.SeleniumException: ERROR: No launcher found for sessionId null
    at com.thoughtworks.selenium.HttpCommandProcessor.doC ommand(HttpCommandProcessor.java:73)
    at com.thoughtworks.selenium.HttpCommandProcessor.sto p(HttpCommandProcessor.java:149)
    at com.thoughtworks.selenium.DefaultSelenium.stop(Def aultSelenium.java:76)
    at com.core.SelTestCase.stop(SelTestCase.java:42)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Native MethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(De legatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:585)
    at org.testng.internal.MethodHelper.invokeMethod(Meth odHelper.java:645)
    at org.testng.internal.Invoker.invokeConfigurationMet hod(Invoker.java:385)
    at org.testng.internal.Invoker.invokeConfigurations(I nvoker.java:141)
    at org.testng.internal.Invoker.invokeConfigurations(I nvoker.java:79)
    at org.testng.internal.TestMethodWorker.invokeAfterCl assMethods(TestMethodWorker.java:192)
    at org.testng.internal.TestMethodWorker.run(TestMetho dWorker.java:112)
    at org.testng.internal.thread.ThreadUtil$CountDownLat chedRunnable.run(ThreadUtil.java:132)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run Task(ThreadPoolExecutor.java:650)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:675)
    at java.lang.Thread.run(Thread.java:595)
    16:19:52.728 INFO - Java: Sun Microsystems Inc. 1.5.0_05-b05
    16:19:52.728 INFO - OS: Windows XP 5.1 x86
    16:19:52.728 INFO - v0.9.2 [2006], with Core v0.8.3 [1879]

    ===============================================
    SuiteforSeleniumandTestNG
    Total tests run: 2, Failures: 2, Skips: 0
    Configuration Failures: 1, Skips: 0
    ===============================================


    Process finished with exit code 0
    //////////////////////

    Is there any thing wrong with my configuration. I had doubt with BeforeSuite annotation of SelTestCase class as I felt that it might be running for every iteration of test after having had check on this I found that it gets executed only once.

    Any guess?

  2. #2
    Advanced Member tarun kumar's Avatar
    Join Date
    Jan 2007
    Location
    Bangalore, India
    Posts
    647
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Parallel run of Tests using TestNG

    Is there any thing wrong in how I have defined the testng.xml file -

    <suite name="SuiteforSeleniumandTestNG" parallel="tests" >

    ???

    I tried using this also -

    <suite name="My suite" parallel="tests" thread-count="5">

    but of no avail.

  3. #3
    Member
    Join Date
    Oct 2005
    Location
    Bulgaria
    Posts
    48
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Parallel run of Tests using TestNG

    Did you try with this :

    @Test(threadPoolSize = 3, invocationCount = 10, timeOut = 10000)public void testServer() {

    In this example, the function testServer will be invoked ten times from three different threads. Additionally, a time-out of ten seconds guarantees that none of the threads will block on this thread forever.

    I found it in the TestNg Documentation.

  4. #4
    Advanced Member tarun kumar's Avatar
    Join Date
    Jan 2007
    Location
    Bangalore, India
    Posts
    647
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Parallel run of Tests using TestNG

    I added these annotation on my test methods but it also leads to the failure of tests.

    LT, have you ever test in parallel that running two browsers to to test tests same set of tests?

    I had a look at Selenium Grid but I am doubtful about its configuration. One entry (http://blog.theautomatedtester.co.uk...of-future.html)
    on net says that it would require usages of multiple selenium objects followed by usages of these objects in tests.

    I don't mind creating multiple objects but in my case where I WANT ALL TESTS TO BE RUN ON TWO DIFFERENT BROWSERS it doesn't make much sense as I would be forced to duplicate whole tests for two different set of RCs.

    So I come down to same problem - How to run same tests in two different browsers on one machine using Selenium RC.

  5. #5
    Advanced Member tarun kumar's Avatar
    Join Date
    Jan 2007
    Location
    Bangalore, India
    Posts
    647
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Parallel run of Tests using TestNG

    I feel there is issue with either starting the selenium server or creation of selenium object. Just to reiterate I have server started only once before suite and stooped only once after suite. So it is as following -

    @BeforeSuite(alwaysRun = true)
    public void startserver() throws Exception {
    SeleniumServer sel = new SeleniumServer();
    sel.start();
    }

    @AfterSuite(alwaysRun = true)
    public void stopserver() throws Exception {
    SeleniumServer sel = new SeleniumServer();
    sel.stop();
    }

    Selenium object should be created before each tests, hence I create selenium object as following -

    @Parameters({"seleniumserveraddress", "browserpath", "appurl"})
    @BeforeTest(alwaysRun = true)
    public void init(String selServerAdd, String browserPath, String appURL) throws Exception {
    selenium = new DefaultSelenium(selServerAdd, SeleniumServer.getDefaultPort(), browserPath, appURL);
    selenium.start();
    }

    @AfterTest(alwaysRun = true)
    public void stop() throws Exception {
    selenium.stop();
    }

    Here I see the potential problem. Say in testng.xml I have two tests for the same class. only thing which differs in these test is the browser configuration so one test is configured to use *iehta and other is configured to use *chrome. Now when I run test in parallel mode I see *iehta getting launched first but as soon as *chrome gets launched it causes *iehta to be closed, and I feel it is because *chrome will get selenium object which was being used by *iehta, to be allocated to it. This might be the reason why suddenly in the middle of test I receive null pointer exception in *iehta browser as selenium object gets deallocated. Now I have two issues -

    -> Get the selenium objects exclusively for a test depending upon the kind of browser to be used.
    -> Get tests run run for the created object. (Certainly I don't want to duplicate my tests for the sake of two different browsers.)

    So I need two selenium objects to be created one for each browser and these objects exercising the tests. Any guess as to how this can be achieved?

  6. #6
    Member
    Join Date
    Oct 2005
    Location
    Bulgaria
    Posts
    48
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Parallel run of Tests using TestNG

    Hi Tarun,

    I have not tried testing in parallel. Actually I finished my project where I used selenium, but I am still watching the posts related to it. I also don't have experience with TestNG. I just reviewed your post and the documentation and notice the annotation. I am sorry that I am suggesting you this without try it.

    However, I know that the grid should give the ability of running parallel tests. I just saw that it allows test to be run in parallel on one machine.

    Please let me know if you integrated it and it works fine for you.
    Best Regards,
    Lubo

  7. #7
    Advanced Member tarun kumar's Avatar
    Join Date
    Jan 2007
    Location
    Bangalore, India
    Posts
    647
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Parallel run of Tests using TestNG

    [ QUOTE ]
    I am sorry that I am suggesting you this without try it.


    [/ QUOTE ]

    No need to be sorry man. I appreciate your help.

    [ QUOTE ]

    However, I know that the grid should give the ability of running parallel tests. I just saw that it allows test to be run in parallel on one machine.Please let me know if you integrated it and it works fine for you.
    Best Regards,
    Lubo

    [/ QUOTE ]

    I had a look at Grid but I am bit unsure about the configuration like -

    It is mentioned on (http://selenium-grid.openqa.org/run_the_demo.html)
    that while starting RC server its environment can be specified. So if fire fox is to be run on windows RC server should be started as -

    ant -Denvironment=”Firefox on Windows” launch-remote-control

    and corresponding selenium object can be created as -

    new DefaultSelenium("localhost", 4444, **'Firefox on Windows'**, 'http://amazon.com');

    This is where my doubts begin. I believe that test code would lie on selenium hub itself so if I am going to drive multiple RC on one or different machine then I should create different selenium objects (as far as I can catch on) in my script but how would I associate these objects with different tests!!!!

    I will follow up with this. If I come up with any solution then I will post it here.

  8. #8
    Advanced Member tarun kumar's Avatar
    Join Date
    Jan 2007
    Location
    Bangalore, India
    Posts
    647
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Parallel run of Tests using TestNG

    Thanks a ton to Mark at -
    http://forums.opensymphony.com/threa...98&#480498

    The problem was due to the fact that I had specified selenium object as static. By making selenium object non static I got my test run parallely using TestNG and Selenium Grid.

  9. #9
    Advanced Member tarun kumar's Avatar
    Join Date
    Jan 2007
    Location
    Bangalore, India
    Posts
    647
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Parallel run of Tests using TestNG

    I have tried to illustrate below as how parallel tests can be run in multiple browsers simultaneously using selenium Grid and TestNG. Hop it helps others -

    • Mark the suite to be run in parallel in testng.xml file –

    <suite name="SuiteforSeleniumandTestNG" parallel="tests">

    • Keep browser parameter in different tests. So I have two tests where in I have kept browser parameters –

    <test name="TestinInternetExplorer">
    <parameter name="browserpath" value="*firefox"/>

    //** Package/Class/Method**//

    </test>

    <test name="TestinFirefox">
    <parameter name="browserpath" value="*iexplore"/>

    //** Package/Class/Method**//

    </test>

    There are no such browsers like iexplore firefox in the language of selenium but luckily during tests selenium converts them in to *pifirefox and *piiexplore. I know about grid_configuration.yml and tried adding these environment but when I executed the tests then I encountered the error these environments are not supported as if they were not part of grid_configuration.yml. During modification of this file I had opened it as notepad.

    • Launch Selenium Hub –

    ant launch-hub

    • Launch two selenium RC servers –

    ant -Dport=5550 -Denvironment=*firefox launch-remote-control -DseleniumArgs=-proxyinjectionmode

    ant -Dport=5551 -Denvironment=*iexplore launch-remote-control -DseleniumArgs=-proxyinjectionmode

    This will get two RC servers registered with Selenium Hub.

    • Run the tests.

    Application over which I had tried it was local to our corporate network.

  10. #10
    Junior Member
    Join Date
    Nov 2007
    Posts
    28
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Parallel run of Tests using TestNG

    Hi Tarun,

    Thanks for your information. But i have some question about the configuration. In the above example you were created two <test> tags and passed the different type of parameters and executing it in parallel. But if i am executing in the same browser do i need to create more than one <test> tag. If that's the case then its like a hardcoding the same things again and again. Please let me know this as soon as possible. It's [stupid is as stupid does].

    <suite name="SuiteforSeleniumandTestNG" parallel="tests">

    • Keep browser parameter in different tests. So I have two tests where in I have kept browser parameters –

    <test name="TestinInternetExplorer">
    <parameter name="browserpath" value="*firefox"/>

    //** Package/Class/Method**//

    </test>

    <test name="TestinFirefox"> ......

    (((((DO I Need to Create this tag if I am going to execute the testcase in Parallel but in the same browser)))))))))

    I tried to create a single test tag but when i run that it's not executing it in parallel and excuting in only once. So can you please provide me the details as soon as possible.



    <parameter name="browserpath" value="*iexplore"/>

    //** Package/Class/Method**//

    </test>

 

 
Page 1 of 2 12 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Search Engine Optimisation provided by DragonByte SEO v2.0.36 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Resources saved on this page: MySQL 10.71%
vBulletin Optimisation provided by vB Optimise v2.6.4 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
User Alert System provided by Advanced User Tagging v3.2.8 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
vBNominate (Lite) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Feedback Buttons provided by Advanced Post Thanks / Like (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Username Changing provided by Username Change (Free) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
BetaSoft Inc.
Digital Point modules: Sphinx-based search
All times are GMT -8. The time now is 09:23 AM.

Copyright BetaSoft Inc.