Parallel execution

classic Classic list List threaded Threaded
22 messages Options
12
Reply | Threaded
Open this post in threaded view
|

Parallel execution

Kuzhali Velmurugan
Hi,

I am trying to execute the test classes in parallel in Chrome instance.
I had set thread count as 3, three instances of browser got opened.
But the username and password gets kkeyed in in the same instance.

Below is the BaseSet up , where I initialize the driver:

public static WebDriver driver;

@Parameters({ "browserType" })
@BeforeClass(alwaysRun = true)
public void initializeTestBaseSetup(@Optional("chrome") String browserType) throws MalformedURLException {
setDriver(browserType);
}

@AfterClass(alwaysRun = true)
public void baseSetupLogOut() {
driver.quit();
}

public WebDriver getDriver() {
return driver;
}

private void setDriver(String browserType) throws MalformedURLException {
switch (browserType) {
case "chrome":
driver = initChromeDriver();
break;
case "firefox":
driver = initFirefoxDriver();
break;
case "IE":
driver = initIEDriver();
break;
default:
driver = initChromeDriver();
}
}

private WebDriver initChromeDriver() throws MalformedURLException {
if ("remote".equalsIgnoreCase(mode)) {
DesiredCapabilities capability = DesiredCapabilities.chrome();
driver = new RemoteWebDriver(new URL(hubUrl), capability);
driver.manage().window().maximize();
} else if ("local".equalsIgnoreCase(mode)) {
System.setProperty("webdriver.chrome.driver", "drivers/Chrome/chromedriver.exe");
ChromeOptions chromeOptions = new ChromeOptions();
chromeOptions.addArguments("--start-maximized");
driver = new ChromeDriver(chromeOptions);
} else {
throw new IllegalArgumentException("Unsupported mode '" + mode + "'");
}
driver.get(miningUrl);

return driver;
}

And I try to do login action, before class (this is in different class and test classes extend this class):
@BeforeClass(alwaysRun = true)
public void baseSetupLogin() {
commonUtils.login();
objDemoHomePage = new DemoHomePage(driver);
objLogin = new LoginPage(driver);
}


Kindly help me to resolve the problem and execute tests in parallel.

Thanks,
Kuzhali

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/c523b49d-dbb1-41b5-90ad-d71264732c1e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Parallel execution

Chaitanya Deshpande
Please share your TestNG XML or code.

Thanks.

Regards,
Chaitanya Deshpande
+91 9028332930

On Tue 12 Jun, 2018, 5:23 PM Kuzhali Velmurugan, <[hidden email]> wrote:
Hi,

I am trying to execute the test classes in parallel in Chrome instance.
I had set thread count as 3, three instances of browser got opened.
But the username and password gets kkeyed in in the same instance.

Below is the BaseSet up , where I initialize the driver:

public static WebDriver driver;

@Parameters({ "browserType" })
@BeforeClass(alwaysRun = true)
public void initializeTestBaseSetup(@Optional("chrome") String browserType) throws MalformedURLException {
setDriver(browserType);
}

@AfterClass(alwaysRun = true)
public void baseSetupLogOut() {
driver.quit();
}

public WebDriver getDriver() {
return driver;
}

private void setDriver(String browserType) throws MalformedURLException {
switch (browserType) {
case "chrome":
driver = initChromeDriver();
break;
case "firefox":
driver = initFirefoxDriver();
break;
case "IE":
driver = initIEDriver();
break;
default:
driver = initChromeDriver();
}
}

private WebDriver initChromeDriver() throws MalformedURLException {
if ("remote".equalsIgnoreCase(mode)) {
DesiredCapabilities capability = DesiredCapabilities.chrome();
driver = new RemoteWebDriver(new URL(hubUrl), capability);
driver.manage().window().maximize();
} else if ("local".equalsIgnoreCase(mode)) {
System.setProperty("webdriver.chrome.driver", "drivers/Chrome/chromedriver.exe");
ChromeOptions chromeOptions = new ChromeOptions();
chromeOptions.addArguments("--start-maximized");
driver = new ChromeDriver(chromeOptions);
} else {
throw new IllegalArgumentException("Unsupported mode '" + mode + "'");
}
driver.get(miningUrl);

return driver;
}

And I try to do login action, before class (this is in different class and test classes extend this class):
@BeforeClass(alwaysRun = true)
public void baseSetupLogin() {
commonUtils.login();
objDemoHomePage = new DemoHomePage(driver);
objLogin = new LoginPage(driver);
}


Kindly help me to resolve the problem and execute tests in parallel.

Thanks,
Kuzhali

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/c523b49d-dbb1-41b5-90ad-d71264732c1e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/CAOmCiwkYTxaVGBVaMY6Y%3DKvUWwmsrSntiipezmaOJ-JnJENEgQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Parallel execution

cassian
In reply to this post by Kuzhali Velmurugan
Try keeping all the implementations of @BeforeClass in BaseTest class itself and have all your tests extend it

Thanks & Regards,
Cassian Raja .T

On Tue, Jun 12, 2018 at 5:22 PM, Kuzhali Velmurugan <[hidden email]> wrote:
Hi,

I am trying to execute the test classes in parallel in Chrome instance.
I had set thread count as 3, three instances of browser got opened.
But the username and password gets kkeyed in in the same instance.

Below is the BaseSet up , where I initialize the driver:

public static WebDriver driver;

@Parameters({ "browserType" })
@BeforeClass(alwaysRun = true)
public void initializeTestBaseSetup(@Optional("chrome") String browserType) throws MalformedURLException {
setDriver(browserType);
}

@AfterClass(alwaysRun = true)
public void baseSetupLogOut() {
driver.quit();
}

public WebDriver getDriver() {
return driver;
}

private void setDriver(String browserType) throws MalformedURLException {
switch (browserType) {
case "chrome":
driver = initChromeDriver();
break;
case "firefox":
driver = initFirefoxDriver();
break;
case "IE":
driver = initIEDriver();
break;
default:
driver = initChromeDriver();
}
}

private WebDriver initChromeDriver() throws MalformedURLException {
if ("remote".equalsIgnoreCase(mode)) {
DesiredCapabilities capability = DesiredCapabilities.chrome();
driver = new RemoteWebDriver(new URL(hubUrl), capability);
driver.manage().window().maximize();
} else if ("local".equalsIgnoreCase(mode)) {
System.setProperty("webdriver.chrome.driver", "drivers/Chrome/chromedriver.exe");
ChromeOptions chromeOptions = new ChromeOptions();
chromeOptions.addArguments("--start-maximized");
driver = new ChromeDriver(chromeOptions);
} else {
throw new IllegalArgumentException("Unsupported mode '" + mode + "'");
}
driver.get(miningUrl);

return driver;
}

And I try to do login action, before class (this is in different class and test classes extend this class):
@BeforeClass(alwaysRun = true)
public void baseSetupLogin() {
commonUtils.login();
objDemoHomePage = new DemoHomePage(driver);
objLogin = new LoginPage(driver);
}


Kindly help me to resolve the problem and execute tests in parallel.

Thanks,
Kuzhali

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/c523b49d-dbb1-41b5-90ad-d71264732c1e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/CABh6KKsNkjQT6oE5HbU3qov7k5WURD3mrvTK1xz15WUWYL%3DX6Q%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Parallel execution

Scott Babcock
In reply to this post by Kuzhali Velmurugan
You're storing your driver references in a `static` field, which means that there's only ever one. Consequently, the references to the first two drivers are being overwritten and lost. You could try storing your driver references in a ThreadLocal, which will provide the per-method storage you want for parallel execution. This is how I handled a similar requirement in one of my frameworks. The code can be found here: ExecutionFlowController.java

This capability is used by my Selenium framework to pass driver references and other test-specific values form phase to phase: TestNgBase.java

On Tuesday, June 12, 2018 at 4:52:54 AM UTC-7, Kuzhali Velmurugan wrote:
Hi,

I am trying to execute the test classes in parallel in Chrome instance.
I had set thread count as 3, three instances of browser got opened.
But the username and password gets kkeyed in in the same instance.

Below is the BaseSet up , where I initialize the driver:

public static WebDriver driver;

@Parameters({ "browserType" })
@BeforeClass(alwaysRun = true)
public void initializeTestBaseSetup(@Optional("chrome") String browserType) throws MalformedURLException {
setDriver(browserType);
}

@AfterClass(alwaysRun = true)
public void baseSetupLogOut() {
driver.quit();
}

public WebDriver getDriver() {
return driver;
}

private void setDriver(String browserType) throws MalformedURLException {
switch (browserType) {
case "chrome":
driver = initChromeDriver();
break;
case "firefox":
driver = initFirefoxDriver();
break;
case "IE":
driver = initIEDriver();
break;
default:
driver = initChromeDriver();
}
}

private WebDriver initChromeDriver() throws MalformedURLException {
if ("remote".equalsIgnoreCase(mode)) {
DesiredCapabilities capability = DesiredCapabilities.chrome();
driver = new RemoteWebDriver(new URL(hubUrl), capability);
driver.manage().window().maximize();
} else if ("local".equalsIgnoreCase(mode)) {
System.setProperty("webdriver.chrome.driver", "drivers/Chrome/chromedriver.exe");
ChromeOptions chromeOptions = new ChromeOptions();
chromeOptions.addArguments("--start-maximized");
driver = new ChromeDriver(chromeOptions);
} else {
throw new IllegalArgumentException("Unsupported mode '" + mode + "'");
}
driver.get(miningUrl);

return driver;
}

And I try to do login action, before class (this is in different class and test classes extend this class):
@BeforeClass(alwaysRun = true)
public void baseSetupLogin() {
commonUtils.login();
objDemoHomePage = new DemoHomePage(driver);
objLogin = new LoginPage(driver);
}


Kindly help me to resolve the problem and execute tests in parallel.

Thanks,
Kuzhali

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/dcb66ee7-ba17-41d9-b991-22fbb381119e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Parallel execution

Scott Babcock
In reply to this post by Kuzhali Velmurugan
Another challenge you'll probably run into with parallel execution in TestNG is that thread count isn't necessarily going limit the number of session that will be created to that exact count. It's quite common to see a run that specifies a thread count of 10 to end up launching 12 or more tests simultaneously, with a corresponding number of browser sessions. To keep from overtaxing your system resources, you end up dialing the thread count way down, which limits your throughput.

In my Selenium framework, I acquire drivers from a local instance of Selenium Grid. The Grid hub configuration provides explicit control over the maximum number of session that will be active at any given moment. This driver management strategy has several other benefits as well. All you need to do to switch to a different driver or add a new driver is to update your configuration. You never need to crack open your code.

If you're interested, the project is found here: [Selenium Foundation](https://github.com/Nordstrom/Selenium-Foundation)

On Tuesday, June 12, 2018 at 4:52:54 AM UTC-7, Kuzhali Velmurugan wrote:
Hi,

I am trying to execute the test classes in parallel in Chrome instance.
I had set thread count as 3, three instances of browser got opened.
But the username and password gets kkeyed in in the same instance.

Below is the BaseSet up , where I initialize the driver:

public static WebDriver driver;

@Parameters({ "browserType" })
@BeforeClass(alwaysRun = true)
public void initializeTestBaseSetup(@Optional("chrome") String browserType) throws MalformedURLException {
setDriver(browserType);
}

@AfterClass(alwaysRun = true)
public void baseSetupLogOut() {
driver.quit();
}

public WebDriver getDriver() {
return driver;
}

private void setDriver(String browserType) throws MalformedURLException {
switch (browserType) {
case "chrome":
driver = initChromeDriver();
break;
case "firefox":
driver = initFirefoxDriver();
break;
case "IE":
driver = initIEDriver();
break;
default:
driver = initChromeDriver();
}
}

private WebDriver initChromeDriver() throws MalformedURLException {
if ("remote".equalsIgnoreCase(mode)) {
DesiredCapabilities capability = DesiredCapabilities.chrome();
driver = new RemoteWebDriver(new URL(hubUrl), capability);
driver.manage().window().maximize();
} else if ("local".equalsIgnoreCase(mode)) {
System.setProperty("webdriver.chrome.driver", "drivers/Chrome/chromedriver.exe");
ChromeOptions chromeOptions = new ChromeOptions();
chromeOptions.addArguments("--start-maximized");
driver = new ChromeDriver(chromeOptions);
} else {
throw new IllegalArgumentException("Unsupported mode '" + mode + "'");
}
driver.get(miningUrl);

return driver;
}

And I try to do login action, before class (this is in different class and test classes extend this class):
@BeforeClass(alwaysRun = true)
public void baseSetupLogin() {
commonUtils.login();
objDemoHomePage = new DemoHomePage(driver);
objLogin = new LoginPage(driver);
}


Kindly help me to resolve the problem and execute tests in parallel.

Thanks,
Kuzhali

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/484d7d40-3ac8-42a1-9515-b66e8c5fb9a0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Parallel execution

Krishnan Mahadevan

Scott,

 

>>>> It's quite common to see a run that specifies a thread count of 10 to end up launching 12 or more tests simultaneously, with a corresponding number of browser sessions.

That to me would be a straight forward bug either in the Test code that is responsible for browser instantiation or the underlying TestRunner. It should be fixed. For me that wouldn’t be a reason for trying to check for alternatives.

 

>>>> In my Selenium framework, I acquire drivers from a local instance of Selenium Grid.

Yes, I remember going down that rabbit hole myself a couple of years back. For local executions (which is mostly the case when you are doing test development and would like to see the browser kick off and watch your test in action to debug), requiring a local instance of Selenium Grid (the one that you spin off via your code, wherein you fire up a hub, fire up a node, wire them together) to come up before browser instances can be allocated to me sounds like too much of an ask.

 

Local executions should be seamless. They should be making use of the more specific RemoteWebDriver variants such as ChromeDriver, FirefoxDriver etc., instead of having to rely on RemoteWebDriver. From a framework perspective it makes sense to try and keep everything standard to always a RemoteWebDriver. In that case, one should try using the DriverService variant (but it’s a lot of overhead and one is better off with using ChromeDriver directly for e.g.,) Something like the below sample.

 

public static void main(String[] args) throws IOException {
  DriverService service = ChromeDriverService.createDefaultService();
  service.start();
  URL url = service.getUrl();
  RemoteWebDriver driver =
new RemoteWebDriver(url, new ChromeOptions());
  driver.get(
"http://www.google.com");
  System.
err.println("Title " + driver.getTitle());
  driver.quit();
  service.stop();
}

 

 

>>>> The Grid hub configuration provides explicit control over the maximum number of session that will be active at any given moment.

If this is the only reason why you are using a local grid, then you could consider alternatives. One such alternative would be to guard your browser instantiation and cleanup via methods that are guarded by Semaphores for e.g., Am sure there are other elegant ways of achieving this as well.

 

 

Thanks & Regards

Krishnan Mahadevan

 

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"

My Scribblings @ http://wakened-cognition.blogspot.com/

My Technical Scribbings @ http://rationaleemotions.wordpress.com/

 

From: <[hidden email]> on behalf of Scott Babcock <[hidden email]>
Reply-To: <[hidden email]>
Date: Wednesday, June 13, 2018 at 9:01 AM
To: Selenium Users <[hidden email]>
Subject: [selenium-users] Re: Parallel execution

 

Another challenge you'll probably run into with parallel execution in TestNG is that thread count isn't necessarily going limit the number of session that will be created to that exact count. It's quite common to see a run that specifies a thread count of 10 to end up launching 12 or more tests simultaneously, with a corresponding number of browser sessions. To keep from overtaxing your system resources, you end up dialing the thread count way down, which limits your throughput.

 

In my Selenium framework, I acquire drivers from a local instance of Selenium Grid. The Grid hub configuration provides explicit control over the maximum number of session that will be active at any given moment. This driver management strategy has several other benefits as well. All you need to do to switch to a different driver or add a new driver is to update your configuration. You never need to crack open your code.

 

If you're interested, the project is found here: [Selenium Foundation](https://github.com/Nordstrom/Selenium-Foundation)


On Tuesday, June 12, 2018 at 4:52:54 AM UTC-7, Kuzhali Velmurugan wrote:

Hi,
 
I am trying to execute the test classes in parallel in Chrome instance.
I had set thread count as 3, three instances of browser got opened.
But the username and password gets kkeyed in in the same instance.
 
Below is the BaseSet up , where I initialize the driver:
 
public static WebDriver driver;

@Parameters({ "browserType" })
@BeforeClass(alwaysRun = true)
public void initializeTestBaseSetup(@Optional("chrome") String browserType) throws MalformedURLException {
    setDriver(browserType);
}

@AfterClass(alwaysRun = true)
public void baseSetupLogOut() {
   
driver.quit();
}

public WebDriver getDriver() {
   
return driver;
}
 
private void setDriver(String browserType) throws MalformedURLException {
   
switch (browserType) {
       
case "chrome":
           
driver = initChromeDriver();
           
break;
       
case "firefox":
           
driver = initFirefoxDriver();
           
break;
       
case "IE":
           
driver = initIEDriver();
           
break;
       
default:
           
driver = initChromeDriver();
    }
}

private WebDriver initChromeDriver() throws MalformedURLException {
   
if ("remote".equalsIgnoreCase(mode)) {
        DesiredCapabilities capability = DesiredCapabilities.chrome();
       
driver = new RemoteWebDriver(new URL(hubUrl), capability);
       
driver.manage().window().maximize();
    }
else if ("local".equalsIgnoreCase(mode)) {
        System.setProperty(
"webdriver.chrome.driver", "drivers/Chrome/chromedriver.exe");
        ChromeOptions chromeOptions =
new ChromeOptions();
        chromeOptions.addArguments(
"--start-maximized");
       
driver = new ChromeDriver(chromeOptions);
    }
else {
       
throw new IllegalArgumentException("Unsupported mode '" + mode + "'");
    }
   
driver.get(miningUrl);

   
return driver;
}
 
And I try to do login action, before class (this is in different class and test classes extend this class):
@BeforeClass(alwaysRun = true)
public void baseSetupLogin() {
   
commonUtils.login();
   
objDemoHomePage = new DemoHomePage(driver);
   
objLogin = new LoginPage(driver);
}
 
 
Kindly help me to resolve the problem and execute tests in parallel.
 
Thanks,
Kuzhali

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/484d7d40-3ac8-42a1-9515-b66e8c5fb9a0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/D8DF41BF-03AB-4E81-B81A-0C71E546A552%40gmail.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Parallel execution

Scott Babcock
Krishnan,

Different browsers expend different amounts of system resources. If you're targeting multiple browsers with your automation, this requires driver-specific management of the maximum instances of any given browser. Why re-invent this, when Grid provides this as a standard feature? I don't know what exact effect the thread count value has on the inner workings of TestNG. This isn't something I need to understand. If I logged a bug with the TestNG team that stated, "I get 12 tests running simultaneously when I set the thread count to 10," they're likely to tell me that this is normal behavior. Why is this significant? My concern is to limit the maximum number of browsers open at any given time, which is exactly what Grid provides.

Rabbit hole? The framework fires up a local Grid in a matter of seconds. Performance has never been an issue. The ability to change the targeted driver and add new browsers by simply updating your configuration is huge. The elimination of behavioral anomalies between local and remote operation avoids a lot of frustration.

Regards,
= Scott =

On Tuesday, June 12, 2018 at 8:49:11 PM UTC-7, Krishnan Mahadevan wrote:

Scott,

 

>>>> It's quite common to see a run that specifies a thread count of 10 to end up launching 12 or more tests simultaneously, with a corresponding number of browser sessions.

That to me would be a straight forward bug either in the Test code that is responsible for browser instantiation or the underlying TestRunner. It should be fixed. For me that wouldn’t be a reason for trying to check for alternatives.

 

>>>> In my Selenium framework, I acquire drivers from a local instance of Selenium Grid.

Yes, I remember going down that rabbit hole myself a couple of years back. For local executions (which is mostly the case when you are doing test development and would like to see the browser kick off and watch your test in action to debug), requiring a local instance of Selenium Grid (the one that you spin off via your code, wherein you fire up a hub, fire up a node, wire them together) to come up before browser instances can be allocated to me sounds like too much of an ask.

 

Local executions should be seamless. They should be making use of the more specific RemoteWebDriver variants such as ChromeDriver, FirefoxDriver etc., instead of having to rely on RemoteWebDriver. From a framework perspective it makes sense to try and keep everything standard to always a RemoteWebDriver. In that case, one should try using the DriverService variant (but it’s a lot of overhead and one is better off with using ChromeDriver directly for e.g.,) Something like the below sample.

 

public static void main(String[] args) throws IOException {
  DriverService service = ChromeDriverService.createDefaultService();
  service.start();
  URL url = service.getUrl();
  RemoteWebDriver driver =
new RemoteWebDriver(url, new ChromeOptions());
  driver.get(
"<a href="http://www.google.com" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://www.google.com&#39;;return true;" onclick="this.href=&#39;http://www.google.com&#39;;return true;">http://www.google.com");
  System.
err.println("Title " + driver.getTitle());
  driver.quit();
  service.stop();
}

 

 

>>>> The Grid hub configuration provides explicit control over the maximum number of session that will be active at any given moment.

If this is the only reason why you are using a local grid, then you could consider alternatives. One such alternative would be to guard your browser instantiation and cleanup via methods that are guarded by Semaphores for e.g., Am sure there are other elegant ways of achieving this as well.

 

 

Thanks & Regards

Krishnan Mahadevan

 

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"

My Scribblings @ <a href="http://wakened-cognition.blogspot.com/" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fwakened-cognition.blogspot.com%2F\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHzOdYJCASIDF_28vQtkp9gnKAYSQ&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fwakened-cognition.blogspot.com%2F\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHzOdYJCASIDF_28vQtkp9gnKAYSQ&#39;;return true;">http://wakened-cognition.blogspot.com/

My Technical Scribbings @ <a href="http://rationaleemotions.wordpress.com/" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Frationaleemotions.wordpress.com%2F\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNEcBOKyRn0lpL8LDbBuyAlKdwgXwQ&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Frationaleemotions.wordpress.com%2F\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNEcBOKyRn0lpL8LDbBuyAlKdwgXwQ&#39;;return true;">http://rationaleemotions.wordpress.com/

 

From: <<a href="javascript:" target="_blank" gdf-obfuscated-mailto="7XC68DM_BQAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">seleniu...@googlegroups.com> on behalf of Scott Babcock <<a href="javascript:" target="_blank" gdf-obfuscated-mailto="7XC68DM_BQAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">sco...@...>
Reply-To: <<a href="javascript:" target="_blank" gdf-obfuscated-mailto="7XC68DM_BQAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">seleniu...@googlegroups.com>
Date: Wednesday, June 13, 2018 at 9:01 AM
To: Selenium Users <<a href="javascript:" target="_blank" gdf-obfuscated-mailto="7XC68DM_BQAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">seleniu...@googlegroups.com>
Subject: [selenium-users] Re: Parallel execution

 

Another challenge you'll probably run into with parallel execution in TestNG is that thread count isn't necessarily going limit the number of session that will be created to that exact count. It's quite common to see a run that specifies a thread count of 10 to end up launching 12 or more tests simultaneously, with a corresponding number of browser sessions. To keep from overtaxing your system resources, you end up dialing the thread count way down, which limits your throughput.

 

In my Selenium framework, I acquire drivers from a local instance of Selenium Grid. The Grid hub configuration provides explicit control over the maximum number of session that will be active at any given moment. This driver management strategy has several other benefits as well. All you need to do to switch to a different driver or add a new driver is to update your configuration. You never need to crack open your code.

 

If you're interested, the project is found here: [Selenium Foundation](<a href="https://github.com/Nordstrom/Selenium-Foundation" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgithub.com%2FNordstrom%2FSelenium-Foundation\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNGdcpQcQWvEXWh_rWtyqSaXrQc7DQ&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgithub.com%2FNordstrom%2FSelenium-Foundation\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNGdcpQcQWvEXWh_rWtyqSaXrQc7DQ&#39;;return true;">https://github.com/Nordstrom/Selenium-Foundation)


On Tuesday, June 12, 2018 at 4:52:54 AM UTC-7, Kuzhali Velmurugan wrote:

Hi,
 
I am trying to execute the test classes in parallel in Chrome instance.
I had set thread count as 3, three instances of browser got opened.
But the username and password gets kkeyed in in the same instance.
 
Below is the BaseSet up , where I initialize the driver:
 
public static WebDriver driver;

@Parameters({ "browserType" })
@BeforeClass(alwaysRun = true)
public void initializeTestBaseSetup(@Optional("chrome") String browserType) throws MalformedURLException {
    setDriver(browserType);
}

@AfterClass(alwaysRun = true)
public void baseSetupLogOut() {
   
driver.quit();
}

public WebDriver getDriver() {
   
return driver;
}
 
private void setDriver(String browserType) throws MalformedURLException {
   
switch (browserType) {
       
case "chrome":
           
driver = initChromeDriver();
           
break;
       
case "firefox":
           
driver = initFirefoxDriver();
           
break;
       
case "IE":
           
driver = initIEDriver();
           
break;
       
default:
           
driver = initChromeDriver();
    }
}

private WebDriver initChromeDriver() throws MalformedURLException {
   
if ("remote".equalsIgnoreCase(mode)) {
        DesiredCapabilities capability = DesiredCapabilities.chrome();
       
driver = new RemoteWebDriver(new URL(hubUrl), capability);
       
driver.manage().window().maximize();
    }
else if ("local".equalsIgnoreCase(mode)) {
        System.setProperty(
"webdriver.chrome.driver", "drivers/Chrome/chromedriver.exe");
        ChromeOptions chromeOptions =
new ChromeOptions();
        chromeOptions.addArguments(
"--start-maximized");
       
driver = new ChromeDriver(chromeOptions);
    }
else {
       
throw new IllegalArgumentException("Unsupported mode '" + mode + "'");
    }
   
driver.get(miningUrl);

   
return driver;
}
 
And I try to do login action, before class (this is in different class and test classes extend this class):
@BeforeClass(alwaysRun = true)
public void baseSetupLogin() {
   
commonUtils.login();
   
objDemoHomePage = new DemoHomePage(driver);
   
objLogin = new LoginPage(driver);
}
 
 
Kindly help me to resolve the problem and execute tests in parallel.
 
Thanks,
Kuzhali

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to <a href="javascript:" target="_blank" gdf-obfuscated-mailto="7XC68DM_BQAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">selenium-user...@googlegroups.com.
To post to this group, send email to <a href="javascript:" target="_blank" gdf-obfuscated-mailto="7XC68DM_BQAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">seleniu...@googlegroups.com.
To view this discussion on the web visit <a href="https://groups.google.com/d/msgid/selenium-users/484d7d40-3ac8-42a1-9515-b66e8c5fb9a0%40googlegroups.com?utm_medium=email&amp;utm_source=footer" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://groups.google.com/d/msgid/selenium-users/484d7d40-3ac8-42a1-9515-b66e8c5fb9a0%40googlegroups.com?utm_medium\x3demail\x26utm_source\x3dfooter&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/msgid/selenium-users/484d7d40-3ac8-42a1-9515-b66e8c5fb9a0%40googlegroups.com?utm_medium\x3demail\x26utm_source\x3dfooter&#39;;return true;">https://groups.google.com/d/msgid/selenium-users/484d7d40-3ac8-42a1-9515-b66e8c5fb9a0%40googlegroups.com.
For more options, visit <a href="https://groups.google.com/d/optout" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;">https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/87ee60a8-5b42-44e9-84bb-202cc8c91651%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Parallel execution

Krishnan Mahadevan

Scott,

 

>>>> If I logged a bug with the TestNG team that stated, "I get 12 tests running simultaneously when I set the thread count to 10," they're likely to tell me that this is normal behavior. 

 

I am one of the committers in TestNG. Trust me, I am not going to come back to you and say that if you set a thread count of 10 and if you notice 12 tests running simultaneously that’s normal behavior. That is a bug. A straight forward bug. Thread-count of 10 in TestNG would mean that TestNG would at any given point in time only run 10 @Test annotated methods at a time. I say this because I know how TestNG works. So, if you have an example wherein you are seeing things otherwise, then it needs to be investigated and fixed. So please help share a sample for that.

 

>>>> Different browsers expend different amounts of system resources. If you're targeting multiple browsers with your automation, this requires driver-specific management of the maximum instances of any given browser.

 

Yes. Absolutely correct. But that doesn’t mean one would need to rely on a remote execution mechanism (which is what the Grid is actually meant for) to basically do that management when it can very well be managed by a sophisticated test runner (such as TestNG for example).

 

>>>> The ability to change the targeted driver and add new browsers by simply updating your configuration is huge.

A well-designed framework should be able to manage this by still letting you specify the browser flavor via a configuration and also specify if it’s a local or a remote run and yet achieve them by toggling between FirefoxDriver/ChromeDriver/InternetExplorerDriver etc., for local runs and using RemoteWebDriver only for remote runs. Its not that difficult.

 

>>>> The elimination of behavioral anomalies between local and remote operation avoids a lot of frustration.

 

I must correct you here. There are no behavioral anomalies between local and remote operation. The grid is just a sophisticated load distribution mechanism. Nothing more and nothing less.

If you take a closer look at the Selenium node implementation you will notice that it still resorts to invoking the same FirefoxDriver or ChromeDriver but via reflection. Just because a test runs a UI automation testcase locally by employing a selenium grid spawned via code, doesn’t get rid of any frustrations that managing a Grid is associated with.

Because things such as ephemeral port exhaustion, selenium node leaking memory due it running for a longer time are still going to come up in a remote execution environment which you will never see in a locally spun off grid via code and whose lifetime is short.

 

Thanks & Regards

Krishnan Mahadevan

 

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"

My Scribblings @ http://wakened-cognition.blogspot.com/

My Technical Scribbings @ http://rationaleemotions.wordpress.com/

 

From: <[hidden email]> on behalf of Scott Babcock <[hidden email]>
Reply-To: <[hidden email]>
Date: Wednesday, June 13, 2018 at 12:44 PM
To: Selenium Users <[hidden email]>
Subject: Re: [selenium-users] Re: Parallel execution

 

Krishnan,

 

Different browsers expend different amounts of system resources. If you're targeting multiple browsers with your automation, this requires driver-specific management of the maximum instances of any given browser. Why re-invent this, when Grid provides this as a standard feature? I don't know what exact effect the thread count value has on the inner workings of TestNG. This isn't something I need to understand. If I logged a bug with the TestNG team that stated, "I get 12 tests running simultaneously when I set the thread count to 10," they're likely to tell me that this is normal behavior. Why is this significant? My concern is to limit the maximum number of browsers open at any given time, which is exactly what Grid provides.

 

Rabbit hole? The framework fires up a local Grid in a matter of seconds. Performance has never been an issue. The ability to change the targeted driver and add new browsers by simply updating your configuration is huge. The elimination of behavioral anomalies between local and remote operation avoids a lot of frustration.

 

Regards,

= Scott =


On Tuesday, June 12, 2018 at 8:49:11 PM UTC-7, Krishnan Mahadevan wrote:

Scott,

 

>>>> It's quite common to see a run that specifies a thread count of 10 to end up launching 12 or more tests simultaneously, with a corresponding number of browser sessions.

That to me would be a straight forward bug either in the Test code that is responsible for browser instantiation or the underlying TestRunner. It should be fixed. For me that wouldn’t be a reason for trying to check for alternatives.

 

>>>> In my Selenium framework, I acquire drivers from a local instance of Selenium Grid.

Yes, I remember going down that rabbit hole myself a couple of years back. For local executions (which is mostly the case when you are doing test development and would like to see the browser kick off and watch your test in action to debug), requiring a local instance of Selenium Grid (the one that you spin off via your code, wherein you fire up a hub, fire up a node, wire them together) to come up before browser instances can be allocated to me sounds like too much of an ask.

 

Local executions should be seamless. They should be making use of the more specific RemoteWebDriver variants such as ChromeDriver, FirefoxDriver etc., instead of having to rely on RemoteWebDriver. From a framework perspective it makes sense to try and keep everything standard to always a RemoteWebDriver. In that case, one should try using the DriverService variant (but it’s a lot of overhead and one is better off with using ChromeDriver directly for e.g.,) Something like the below sample.

 

public static void main(String[] args) throws IOException {
  DriverService service = ChromeDriverService.createDefaultService();
  service.start();
  URL url = service.getUrl();
  RemoteWebDriver driver =
new RemoteWebDriver(url, new ChromeOptions());
  driver.get(
"http://www.google.com");
  System.
err.println("Title " + driver.getTitle());
  driver.quit();
  service.stop();
}

 

 

>>>> The Grid hub configuration provides explicit control over the maximum number of session that will be active at any given moment.

If this is the only reason why you are using a local grid, then you could consider alternatives. One such alternative would be to guard your browser instantiation and cleanup via methods that are guarded by Semaphores for e.g., Am sure there are other elegant ways of achieving this as well.

 

 

Thanks & Regards

Krishnan Mahadevan

 

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"

My Scribblings @ http://wakened-cognition.blogspot.com/

My Technical Scribbings @ http://rationaleemotions.wordpress.com/

 

From: <<a href="javascript:" target="_blank">seleniu...@...> on behalf of Scott Babcock <<a href="javascript:" target="_blank">sco...@...>
Reply-To: <<a href="javascript:" target="_blank">seleniu...@...>
Date: Wednesday, June 13, 2018 at 9:01 AM
To: Selenium Users <<a href="javascript:" target="_blank">seleniu...@...>
Subject: [selenium-users] Re: Parallel execution

 

Another challenge you'll probably run into with parallel execution in TestNG is that thread count isn't necessarily going limit the number of session that will be created to that exact count. It's quite common to see a run that specifies a thread count of 10 to end up launching 12 or more tests simultaneously, with a corresponding number of browser sessions. To keep from overtaxing your system resources, you end up dialing the thread count way down, which limits your throughput.

 

In my Selenium framework, I acquire drivers from a local instance of Selenium Grid. The Grid hub configuration provides explicit control over the maximum number of session that will be active at any given moment. This driver management strategy has several other benefits as well. All you need to do to switch to a different driver or add a new driver is to update your configuration. You never need to crack open your code.

 

If you're interested, the project is found here: [Selenium Foundation](https://github.com/Nordstrom/Selenium-Foundation)


On Tuesday, June 12, 2018 at 4:52:54 AM UTC-7, Kuzhali Velmurugan wrote:

Hi,
 
I am trying to execute the test classes in parallel in Chrome instance.
I had set thread count as 3, three instances of browser got opened.
But the username and password gets kkeyed in in the same instance.
 
Below is the BaseSet up , where I initialize the driver:
 
public static WebDriver driver;

@Parameters({ "browserType" })
@BeforeClass(alwaysRun = true)
public void initializeTestBaseSetup(@Optional("chrome") String browserType) throws MalformedURLException {
    setDriver(browserType);
}

@AfterClass(alwaysRun = true)
public void baseSetupLogOut() {
   
driver.quit();
}

public WebDriver getDriver() {
   
return driver;
}
 
private void setDriver(String browserType) throws MalformedURLException {
   
switch (browserType) {
       
case "chrome":
           
driver = initChromeDriver();
           
break;
       
case "firefox":
           
driver = initFirefoxDriver();
           
break;
       
case "IE":
           
driver = initIEDriver();
           
break;
       
default:
           
driver = initChromeDriver();
    }
}

private WebDriver initChromeDriver() throws MalformedURLException {
   
if ("remote".equalsIgnoreCase(mode)) {
        DesiredCapabilities capability = DesiredCapabilities.chrome();
       
driver = new RemoteWebDriver(new URL(hubUrl), capability);
       
driver.manage().window().maximize();
    }
else if ("local".equalsIgnoreCase(mode)) {
        System.setProperty(
"webdriver.chrome.driver", "drivers/Chrome/chromedriver.exe");
        ChromeOptions chromeOptions =
new ChromeOptions();
        chromeOptions.addArguments(
"--start-maximized");
       
driver = new ChromeDriver(chromeOptions);
    }
else {
       
throw new IllegalArgumentException("Unsupported mode '" + mode + "'");
    }
   
driver.get(miningUrl);

   
return driver;
}
 
And I try to do login action, before class (this is in different class and test classes extend this class):
@BeforeClass(alwaysRun = true)
public void baseSetupLogin() {
   
commonUtils.login();
   
objDemoHomePage = new DemoHomePage(driver);
   
objLogin = new LoginPage(driver);
}
 
 
Kindly help me to resolve the problem and execute tests in parallel.
 
Thanks,
Kuzhali

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to <a href="javascript:" target="_blank">selenium-user...@....
To post to this group, send email to <a href="javascript:" target="_blank">seleniu...@....
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/484d7d40-3ac8-42a1-9515-b66e8c5fb9a0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/87ee60a8-5b42-44e9-84bb-202cc8c91651%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/531B78FC-56B9-4434-A937-A9F84918F678%40gmail.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Parallel execution

Scott Babcock
Krishnan,

If you specify thread count and data provider thread count together, you get wildly varying numbers of tests running at any given moment. I don't think this is a bug. This is just multi-threading in action. The objective of running tests in parallel is to maximize throughput. The implementations of the tests themselves don't require significant resources. It's the browsers that really devour resources. The goal is to run as many session as possible without causing the system to bog down. This concern is not the responsibility of the generic test framework. This should be handled by the scenario-specific implementation that runs on top.

Yes, Selenium Grid was originally designed for remote operation. As far as I know, this is true for every component of WebDriver. Why does the typical application of Grid preclude it from being used for local operations? You're advocating for the re-creation the functionality of Grid. What are the advantages of this approach that justify the time and effort this would require?

On Wednesday, June 13, 2018 at 12:25:51 AM UTC-7, Krishnan Mahadevan wrote:

Scott,

 

>>>> If I logged a bug with the TestNG team that stated, "I get 12 tests running simultaneously when I set the thread count to 10," they're likely to tell me that this is normal behavior. 

 

I am one of the committers in TestNG. Trust me, I am not going to come back to you and say that if you set a thread count of 10 and if you notice 12 tests running simultaneously that’s normal behavior. That is a bug. A straight forward bug. Thread-count of 10 in TestNG would mean that TestNG would at any given point in time only run 10 @Test annotated methods at a time. I say this because I know how TestNG works. So, if you have an example wherein you are seeing things otherwise, then it needs to be investigated and fixed. So please help share a sample for that.

 

>>>> Different browsers expend different amounts of system resources. If you're targeting multiple browsers with your automation, this requires driver-specific management of the maximum instances of any given browser.

 

Yes. Absolutely correct. But that doesn’t mean one would need to rely on a remote execution mechanism (which is what the Grid is actually meant for) to basically do that management when it can very well be managed by a sophisticated test runner (such as TestNG for example).

 

>>>> The ability to change the targeted driver and add new browsers by simply updating your configuration is huge.

A well-designed framework should be able to manage this by still letting you specify the browser flavor via a configuration and also specify if it’s a local or a remote run and yet achieve them by toggling between FirefoxDriver/ChromeDriver/InternetExplorerDriver etc., for local runs and using RemoteWebDriver only for remote runs. Its not that difficult.

 

>>>> The elimination of behavioral anomalies between local and remote operation avoids a lot of frustration.

 

I must correct you here. There are no behavioral anomalies between local and remote operation. The grid is just a sophisticated load distribution mechanism. Nothing more and nothing less.

If you take a closer look at the Selenium node implementation you will notice that it still resorts to invoking the same FirefoxDriver or ChromeDriver but via reflection. Just because a test runs a UI automation testcase locally by employing a selenium grid spawned via code, doesn’t get rid of any frustrations that managing a Grid is associated with.

Because things such as ephemeral port exhaustion, selenium node leaking memory due it running for a longer time are still going to come up in a remote execution environment which you will never see in a locally spun off grid via code and whose lifetime is short.

 

Thanks & Regards

Krishnan Mahadevan

 

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"

My Scribblings @ <a href="http://wakened-cognition.blogspot.com/" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fwakened-cognition.blogspot.com%2F\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHzOdYJCASIDF_28vQtkp9gnKAYSQ&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fwakened-cognition.blogspot.com%2F\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHzOdYJCASIDF_28vQtkp9gnKAYSQ&#39;;return true;">http://wakened-cognition.blogspot.com/

My Technical Scribbings @ <a href="http://rationaleemotions.wordpress.com/" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Frationaleemotions.wordpress.com%2F\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNEcBOKyRn0lpL8LDbBuyAlKdwgXwQ&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Frationaleemotions.wordpress.com%2F\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNEcBOKyRn0lpL8LDbBuyAlKdwgXwQ&#39;;return true;">http://rationaleemotions.wordpress.com/

 

From: <<a href="javascript:" target="_blank" gdf-obfuscated-mailto="LUcg2gZLBQAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">seleniu...@googlegroups.com> on behalf of Scott Babcock <<a href="javascript:" target="_blank" gdf-obfuscated-mailto="LUcg2gZLBQAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">sco...@...>
Reply-To: <<a href="javascript:" target="_blank" gdf-obfuscated-mailto="LUcg2gZLBQAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">seleniu...@googlegroups.com>
Date: Wednesday, June 13, 2018 at 12:44 PM
To: Selenium Users <<a href="javascript:" target="_blank" gdf-obfuscated-mailto="LUcg2gZLBQAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">seleniu...@googlegroups.com>
Subject: Re: [selenium-users] Re: Parallel execution

 

Krishnan,

 

Different browsers expend different amounts of system resources. If you're targeting multiple browsers with your automation, this requires driver-specific management of the maximum instances of any given browser. Why re-invent this, when Grid provides this as a standard feature? I don't know what exact effect the thread count value has on the inner workings of TestNG. This isn't something I need to understand. If I logged a bug with the TestNG team that stated, "I get 12 tests running simultaneously when I set the thread count to 10," they're likely to tell me that this is normal behavior. Why is this significant? My concern is to limit the maximum number of browsers open at any given time, which is exactly what Grid provides.

 

Rabbit hole? The framework fires up a local Grid in a matter of seconds. Performance has never been an issue. The ability to change the targeted driver and add new browsers by simply updating your configuration is huge. The elimination of behavioral anomalies between local and remote operation avoids a lot of frustration.

 

Regards,

= Scott =


On Tuesday, June 12, 2018 at 8:49:11 PM UTC-7, Krishnan Mahadevan wrote:

Scott,

 

>>>> It's quite common to see a run that specifies a thread count of 10 to end up launching 12 or more tests simultaneously, with a corresponding number of browser sessions.

That to me would be a straight forward bug either in the Test code that is responsible for browser instantiation or the underlying TestRunner. It should be fixed. For me that wouldn’t be a reason for trying to check for alternatives.

 

>>>> In my Selenium framework, I acquire drivers from a local instance of Selenium Grid.

Yes, I remember going down that rabbit hole myself a couple of years back. For local executions (which is mostly the case when you are doing test development and would like to see the browser kick off and watch your test in action to debug), requiring a local instance of Selenium Grid (the one that you spin off via your code, wherein you fire up a hub, fire up a node, wire them together) to come up before browser instances can be allocated to me sounds like too much of an ask.

 

Local executions should be seamless. They should be making use of the more specific RemoteWebDriver variants such as ChromeDriver, FirefoxDriver etc., instead of having to rely on RemoteWebDriver. From a framework perspective it makes sense to try and keep everything standard to always a RemoteWebDriver. In that case, one should try using the DriverService variant (but it’s a lot of overhead and one is better off with using ChromeDriver directly for e.g.,) Something like the below sample.

 

public static void main(String[] args) throws IOException {
  DriverService service = ChromeDriverService.createDefaultService();
  service.start();
  URL url = service.getUrl();
  RemoteWebDriver driver =
new RemoteWebDriver(url, new ChromeOptions());
  driver.get(
"<a href="http://www.google.com" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://www.google.com&#39;;return true;" onclick="this.href=&#39;http://www.google.com&#39;;return true;">http://www.google.com");
  System.
err.println("Title " + driver.getTitle());
  driver.quit();
  service.stop();
}

 

 

>>>> The Grid hub configuration provides explicit control over the maximum number of session that will be active at any given moment.

If this is the only reason why you are using a local grid, then you could consider alternatives. One such alternative would be to guard your browser instantiation and cleanup via methods that are guarded by Semaphores for e.g., Am sure there are other elegant ways of achieving this as well.

 

 

Thanks & Regards

Krishnan Mahadevan

 

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"

My Scribblings @ <a href="http://wakened-cognition.blogspot.com/" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fwakened-cognition.blogspot.com%2F\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHzOdYJCASIDF_28vQtkp9gnKAYSQ&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fwakened-cognition.blogspot.com%2F\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHzOdYJCASIDF_28vQtkp9gnKAYSQ&#39;;return true;">http://wakened-cognition.blogspot.com/

My Technical Scribbings @ <a href="http://rationaleemotions.wordpress.com/" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Frationaleemotions.wordpress.com%2F\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNEcBOKyRn0lpL8LDbBuyAlKdwgXwQ&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Frationaleemotions.wordpress.com%2F\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNEcBOKyRn0lpL8LDbBuyAlKdwgXwQ&#39;;return true;">http://rationaleemotions.wordpress.com/

 

From: <[hidden email]> on behalf of Scott Babcock <[hidden email]>
Reply-To: <[hidden email]>
Date: Wednesday, June 13, 2018 at 9:01 AM
To: Selenium Users <[hidden email]>
Subject: [selenium-users] Re: Parallel execution

 

Another challenge you'll probably run into with parallel execution in TestNG is that thread count isn't necessarily going limit the number of session that will be created to that exact count. It's quite common to see a run that specifies a thread count of 10 to end up launching 12 or more tests simultaneously, with a corresponding number of browser sessions. To keep from overtaxing your system resources, you end up dialing the thread count way down, which limits your throughput.

 

In my Selenium framework, I acquire drivers from a local instance of Selenium Grid. The Grid hub configuration provides explicit control over the maximum number of session that will be active at any given moment. This driver management strategy has several other benefits as well. All you need to do to switch to a different driver or add a new driver is to update your configuration. You never need to crack open your code.

 

If you're interested, the project is found here: [Selenium Foundation](<a href="https://github.com/Nordstrom/Selenium-Foundation" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgithub.com%2FNordstrom%2FSelenium-Foundation\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNGdcpQcQWvEXWh_rWtyqSaXrQc7DQ&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgithub.com%2FNordstrom%2FSelenium-Foundation\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNGdcpQcQWvEXWh_rWtyqSaXrQc7DQ&#39;;return true;">https://github.com/Nordstrom/Selenium-Foundation)


On Tuesday, June 12, 2018 at 4:52:54 AM UTC-7, Kuzhali Velmurugan wrote:

Hi,
 
I am trying to execute the test classes in parallel in Chrome instance.
I had set thread count as 3, three instances of browser got opened.
But the username and password gets kkeyed in in the same instance.
 
Below is the BaseSet up , where I initialize the driver:
 
public static WebDriver driver;

@Parameters({ "browserType" })
@BeforeClass(alwaysRun = true)
public void initializeTestBaseSetup(@Optional("chrome") String browserType) throws MalformedURLException {
    setDriver(browserType);
}

@AfterClass(alwaysRun = true)
public void baseSetupLogOut() {
   
driver.quit();
}

public WebDriver getDriver() {
   
return driver;
}
 
private void setDriver(String browserType) throws MalformedURLException {
   
switch (browserType) {
       
case "chrome":
           
driver = initChromeDriver();
           
break;
       
case "firefox":
           
driver = initFirefoxDriver();
           
break;
       
case "IE":
           
driver = initIEDriver();
           
break;
       
default:
           
driver = initChromeDriver();
    }
}

private WebDriver initChromeDriver() throws MalformedURLException {
   
if ("remote".equalsIgnoreCase(mode)) {
        DesiredCapabilities capability = DesiredCapabilities.chrome();
       
driver = new RemoteWebDriver(new URL(hubUrl), capability);
       
driver.manage().window().maximize();
    }
else if ("local".equalsIgnoreCase(mode)) {
        System.setProperty(
"webdriver.chrome.driver", "drivers/Chrome/chromedriver.exe");
        ChromeOptions chromeOptions =
new ChromeOptions();
        chromeOptions.addArguments(
"--start-maximized");
       
driver = new ChromeDriver(chromeOptions);
    }
else {
       
throw new IllegalArgumentException("Unsupported mode '" + mode + "'");
    }
   
driver.get(miningUrl);

   
return driver;
}
 
And I try to do login action, before class (this is in different class and test classes extend this class):
@BeforeClass(alwaysRun = true)
public void baseSetupLogin() {
   
commonUtils.login();
   
objDemoHomePage = new DemoHomePage(driver);
   
objLogin = new LoginPage(driver);
}
 
 
Kindly help me to resolve the problem and execute tests in parallel.
 
Thanks,
Kuzhali

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-user...@googlegroups.com.
To post to this group, send email to [hidden email].
To view this discussion on the web visit <a href="https://groups.google.com/d/msgid/selenium-users/484d7d40-3ac8-42a1-9515-b66e8c5fb9a0%40googlegroups.com?utm_medium=email&amp;utm_source=footer" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://groups.google.com/d/msgid/selenium-users/484d7d40-3ac8-42a1-9515-b66e8c5fb9a0%40googlegroups.com?utm_medium\x3demail\x26utm_source\x3dfooter&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/msgid/selenium-users/484d7d40-3ac8-42a1-9515-b66e8c5fb9a0%40googlegroups.com?utm_medium\x3demail\x26utm_source\x3dfooter&#39;;return true;">https://groups.google.com/d/msgid/selenium-users/484d7d40-3ac8-42a1-9515-b66e8c5fb9a0%40googlegroups.com.
For more options, visit <a href="https://groups.google.com/d/optout" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;">https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to <a href="javascript:" target="_blank" gdf-obfuscated-mailto="LUcg2gZLBQAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">selenium-user...@googlegroups.com.
To post to this group, send email to <a href="javascript:" target="_blank" gdf-obfuscated-mailto="LUcg2gZLBQAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">seleniu...@googlegroups.com.
To view this discussion on the web visit <a href="https://groups.google.com/d/msgid/selenium-users/87ee60a8-5b42-44e9-84bb-202cc8c91651%40googlegroups.com?utm_medium=email&amp;utm_source=footer" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://groups.google.com/d/msgid/selenium-users/87ee60a8-5b42-44e9-84bb-202cc8c91651%40googlegroups.com?utm_medium\x3demail\x26utm_source\x3dfooter&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/msgid/selenium-users/87ee60a8-5b42-44e9-84bb-202cc8c91651%40googlegroups.com?utm_medium\x3demail\x26utm_source\x3dfooter&#39;;return true;">https://groups.google.com/d/msgid/selenium-users/87ee60a8-5b42-44e9-84bb-202cc8c91651%40googlegroups.com.
For more options, visit <a href="https://groups.google.com/d/optout" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;">https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/53d4c694-f50e-4d05-ab1e-a9079fe5aab3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Parallel execution

Krishnan Mahadevan
Not every component of webdriver was designed for remote execution. 

Selenium grid was the only one designed for remote execution and as far as I know ( from the RC days this is true ). 

There's a lot to the selenium grid than what you are suggesting. So it would be an understatement if one were to say that controlling the number of sessions in a different way would be equal to duplicating the selenium grid functionality. 

The idea is simple. Local executions are only used when a test is being created or built. For that one doesn't need anything more than a simple webdriver instantiation. 

All the benefits that you mentioned come into effect when one is basically running in a CI mode on when there's a build system involved which constantly runs tests. For that one wouldn't be using a programmatically spun off grid but would be routing their tests to an actually running grid in a remote environment. 

The idea is to use the tool for which it was meant for. 

A test and a data driven test are attributes of a test runner. Browser instantiation is completely separate from that. 

Building a simple logic that throttles instantiation for local executions ( this by itself is not required in my opinion because my premise is local execution is only for Dev mode and not for the actual test mode where tests are run in bulk) doesn't require any effort than some basic programming abilities ( which is anyways needed when one takes up the task of building a framework). 



On Wed 13 Jun, 2018, 15:00 Scott Babcock, <[hidden email]> wrote:
Krishnan,

If you specify thread count and data provider thread count together, you get wildly varying numbers of tests running at any given moment. I don't think this is a bug. This is just multi-threading in action. The objective of running tests in parallel is to maximize throughput. The implementations of the tests themselves don't require significant resources. It's the browsers that really devour resources. The goal is to run as many session as possible without causing the system to bog down. This concern is not the responsibility of the generic test framework. This should be handled by the scenario-specific implementation that runs on top.

Yes, Selenium Grid was originally designed for remote operation. As far as I know, this is true for every component of WebDriver. Why does the typical application of Grid preclude it from being used for local operations? You're advocating for the re-creation the functionality of Grid. What are the advantages of this approach that justify the time and effort this would require?


On Wednesday, June 13, 2018 at 12:25:51 AM UTC-7, Krishnan Mahadevan wrote:

Scott,

 

>>>> If I logged a bug with the TestNG team that stated, "I get 12 tests running simultaneously when I set the thread count to 10," they're likely to tell me that this is normal behavior. 

 

I am one of the committers in TestNG. Trust me, I am not going to come back to you and say that if you set a thread count of 10 and if you notice 12 tests running simultaneously that’s normal behavior. That is a bug. A straight forward bug. Thread-count of 10 in TestNG would mean that TestNG would at any given point in time only run 10 @Test annotated methods at a time. I say this because I know how TestNG works. So, if you have an example wherein you are seeing things otherwise, then it needs to be investigated and fixed. So please help share a sample for that.

 

>>>> Different browsers expend different amounts of system resources. If you're targeting multiple browsers with your automation, this requires driver-specific management of the maximum instances of any given browser.

 

Yes. Absolutely correct. But that doesn’t mean one would need to rely on a remote execution mechanism (which is what the Grid is actually meant for) to basically do that management when it can very well be managed by a sophisticated test runner (such as TestNG for example).

 

>>>> The ability to change the targeted driver and add new browsers by simply updating your configuration is huge.

A well-designed framework should be able to manage this by still letting you specify the browser flavor via a configuration and also specify if it’s a local or a remote run and yet achieve them by toggling between FirefoxDriver/ChromeDriver/InternetExplorerDriver etc., for local runs and using RemoteWebDriver only for remote runs. Its not that difficult.

 

>>>> The elimination of behavioral anomalies between local and remote operation avoids a lot of frustration.

 

I must correct you here. There are no behavioral anomalies between local and remote operation. The grid is just a sophisticated load distribution mechanism. Nothing more and nothing less.

If you take a closer look at the Selenium node implementation you will notice that it still resorts to invoking the same FirefoxDriver or ChromeDriver but via reflection. Just because a test runs a UI automation testcase locally by employing a selenium grid spawned via code, doesn’t get rid of any frustrations that managing a Grid is associated with.

Because things such as ephemeral port exhaustion, selenium node leaking memory due it running for a longer time are still going to come up in a remote execution environment which you will never see in a locally spun off grid via code and whose lifetime is short.

 

Thanks & Regards

Krishnan Mahadevan

 

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"

My Scribblings @ http://wakened-cognition.blogspot.com/

My Technical Scribbings @ http://rationaleemotions.wordpress.com/

 

From: <[hidden email]> on behalf of Scott Babcock <[hidden email]>
Reply-To: <[hidden email]>


Date: Wednesday, June 13, 2018 at 12:44 PM

To: Selenium Users <[hidden email]>


Subject: Re: [selenium-users] Re: Parallel execution

 

Krishnan,

 

Different browsers expend different amounts of system resources. If you're targeting multiple browsers with your automation, this requires driver-specific management of the maximum instances of any given browser. Why re-invent this, when Grid provides this as a standard feature? I don't know what exact effect the thread count value has on the inner workings of TestNG. This isn't something I need to understand. If I logged a bug with the TestNG team that stated, "I get 12 tests running simultaneously when I set the thread count to 10," they're likely to tell me that this is normal behavior. Why is this significant? My concern is to limit the maximum number of browsers open at any given time, which is exactly what Grid provides.

 

Rabbit hole? The framework fires up a local Grid in a matter of seconds. Performance has never been an issue. The ability to change the targeted driver and add new browsers by simply updating your configuration is huge. The elimination of behavioral anomalies between local and remote operation avoids a lot of frustration.

 

Regards,

= Scott =


On Tuesday, June 12, 2018 at 8:49:11 PM UTC-7, Krishnan Mahadevan wrote:

Scott,

 

>>>> It's quite common to see a run that specifies a thread count of 10 to end up launching 12 or more tests simultaneously, with a corresponding number of browser sessions.

That to me would be a straight forward bug either in the Test code that is responsible for browser instantiation or the underlying TestRunner. It should be fixed. For me that wouldn’t be a reason for trying to check for alternatives.

 

>>>> In my Selenium framework, I acquire drivers from a local instance of Selenium Grid.

Yes, I remember going down that rabbit hole myself a couple of years back. For local executions (which is mostly the case when you are doing test development and would like to see the browser kick off and watch your test in action to debug), requiring a local instance of Selenium Grid (the one that you spin off via your code, wherein you fire up a hub, fire up a node, wire them together) to come up before browser instances can be allocated to me sounds like too much of an ask.

 

Local executions should be seamless. They should be making use of the more specific RemoteWebDriver variants such as ChromeDriver, FirefoxDriver etc., instead of having to rely on RemoteWebDriver. From a framework perspective it makes sense to try and keep everything standard to always a RemoteWebDriver. In that case, one should try using the DriverService variant (but it’s a lot of overhead and one is better off with using ChromeDriver directly for e.g.,) Something like the below sample.

 

public static void main(String[] args) throws IOException {
  DriverService service = ChromeDriverService.createDefaultService();
  service.start();
  URL url = service.getUrl();
  RemoteWebDriver driver =
new RemoteWebDriver(url, new ChromeOptions());
  driver.get(
"http://www.google.com");
  System.
err.println("Title " + driver.getTitle());
  driver.quit();
  service.stop();
}

 

 

>>>> The Grid hub configuration provides explicit control over the maximum number of session that will be active at any given moment.

If this is the only reason why you are using a local grid, then you could consider alternatives. One such alternative would be to guard your browser instantiation and cleanup via methods that are guarded by Semaphores for e.g., Am sure there are other elegant ways of achieving this as well.

 

 

Thanks & Regards

Krishnan Mahadevan

 

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"

My Scribblings @ http://wakened-cognition.blogspot.com/

My Technical Scribbings @ http://rationaleemotions.wordpress.com/

 

From: <[hidden email]> on behalf of Scott Babcock <[hidden email]>
Reply-To: <[hidden email]>
Date: Wednesday, June 13, 2018 at 9:01 AM
To: Selenium Users <[hidden email]>
Subject: [selenium-users] Re: Parallel execution

 

Another challenge you'll probably run into with parallel execution in TestNG is that thread count isn't necessarily going limit the number of session that will be created to that exact count. It's quite common to see a run that specifies a thread count of 10 to end up launching 12 or more tests simultaneously, with a corresponding number of browser sessions. To keep from overtaxing your system resources, you end up dialing the thread count way down, which limits your throughput.

 

In my Selenium framework, I acquire drivers from a local instance of Selenium Grid. The Grid hub configuration provides explicit control over the maximum number of session that will be active at any given moment. This driver management strategy has several other benefits as well. All you need to do to switch to a different driver or add a new driver is to update your configuration. You never need to crack open your code.

 

If you're interested, the project is found here: [Selenium Foundation](https://github.com/Nordstrom/Selenium-Foundation)


On Tuesday, June 12, 2018 at 4:52:54 AM UTC-7, Kuzhali Velmurugan wrote:

Hi,
 
I am trying to execute the test classes in parallel in Chrome instance.
I had set thread count as 3, three instances of browser got opened.
But the username and password gets kkeyed in in the same instance.
 
Below is the BaseSet up , where I initialize the driver:
 
public static WebDriver driver;

@Parameters({ "browserType" })
@BeforeClass(alwaysRun = true)
public void initializeTestBaseSetup(@Optional("chrome") String browserType) throws MalformedURLException {
    setDriver(browserType);
}

@AfterClass(alwaysRun = true)
public void baseSetupLogOut() {
   
driver.quit();
}

public WebDriver getDriver() {
   
return driver;
}
 
private void setDriver(String browserType) throws MalformedURLException {
   
switch (browserType) {
       
case "chrome":
           
driver = initChromeDriver();
           
break;
       
case "firefox":
           
driver = initFirefoxDriver();
           
break;
       
case "IE":
           
driver = initIEDriver();
           
break;
       
default:
           
driver = initChromeDriver();
    }
}

private WebDriver initChromeDriver() throws MalformedURLException {
   
if ("remote".equalsIgnoreCase(mode)) {
        DesiredCapabilities capability = DesiredCapabilities.chrome();
       
driver = new RemoteWebDriver(new URL(hubUrl), capability);
       
driver.manage().window().maximize();
    }
else if ("local".equalsIgnoreCase(mode)) {
        System.setProperty(
"webdriver.chrome.driver", "drivers/Chrome/chromedriver.exe");
        ChromeOptions chromeOptions =
new ChromeOptions();
        chromeOptions.addArguments(
"--start-maximized");
       
driver = new ChromeDriver(chromeOptions);
    }
else {
       
throw new IllegalArgumentException("Unsupported mode '" + mode + "'");
    }
   
driver.get(miningUrl);

   
return driver;
}
 
And I try to do login action, before class (this is in different class and test classes extend this class):
@BeforeClass(alwaysRun = true)
public void baseSetupLogin() {
   
commonUtils.login();
   
objDemoHomePage = new DemoHomePage(driver);
   
objLogin = new LoginPage(driver);
}
 
 
Kindly help me to resolve the problem and execute tests in parallel.
 
Thanks,
Kuzhali

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/484d7d40-3ac8-42a1-9515-b66e8c5fb9a0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/53d4c694-f50e-4d05-ab1e-a9079fe5aab3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--

Thanks & Regards
Krishnan Mahadevan

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"
My Scribblings @ http://wakened-cognition.blogspot.com/

My Technical Scribbings @ http://rationaleemotions.wordpress.com/

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/CANikZLm9P1h1F0gEZZuj5zATZ9bMRESyoE0pM2qH1e%3D0hrYUsg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Parallel execution

Scott Babcock
public class ChromeDriver extends RemoteWebDriver public class EdgeDriver extends RemoteWebDriver public class FirefoxDriver extends RemoteWebDriver public class InternetExplorerDriver extends RemoteWebDriver public class OperaDriver extends RemoteWebDriver public class SafariDriver extends RemoteWebDriver

Seems to me that it's all designed for remote operation. Not only are you proposing that folks should re-implement existing functionality, you're also suggesting that "developer" code should differ from "production" code. 

Aside from that, the OP's question regards driver management when running tests in parallel. I posted my observation regarding the 'static' modifier on his `driver` field and its affect on the behavior of his code. I then informed him that the `threadCount` setting isn't guaranteed to provided one-to-one control over the number of tests that are executing at any given moment when running in parallel. I pointed him at the solution I've used to achieve explicit control over the maximum number of browser sessions that will be active at any given moment. If the OP finds this useful, great. If not, perhaps someone else with a similar problem will. Regardless, I've provided accurate information and proven solutions.

On Wednesday, June 13, 2018 at 3:34:29 AM UTC-7, Krishnan Mahadevan wrote:
Not every component of webdriver was designed for remote execution. 

Selenium grid was the only one designed for remote execution and as far as I know ( from the RC days this is true ). 

There's a lot to the selenium grid than what you are suggesting. So it would be an understatement if one were to say that controlling the number of sessions in a different way would be equal to duplicating the selenium grid functionality. 

The idea is simple. Local executions are only used when a test is being created or built. For that one doesn't need anything more than a simple webdriver instantiation. 

All the benefits that you mentioned come into effect when one is basically running in a CI mode on when there's a build system involved which constantly runs tests. For that one wouldn't be using a programmatically spun off grid but would be routing their tests to an actually running grid in a remote environment. 

The idea is to use the tool for which it was meant for. 

A test and a data driven test are attributes of a test runner. Browser instantiation is completely separate from that. 

Building a simple logic that throttles instantiation for local executions ( this by itself is not required in my opinion because my premise is local execution is only for Dev mode and not for the actual test mode where tests are run in bulk) doesn't require any effort than some basic programming abilities ( which is anyways needed when one takes up the task of building a framework). 



On Wed 13 Jun, 2018, 15:00 Scott Babcock, <<a href="javascript:" target="_blank" gdf-obfuscated-mailto="eo6RQQv1BQAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">sco...@...> wrote:
Krishnan,

If you specify thread count and data provider thread count together, you get wildly varying numbers of tests running at any given moment. I don't think this is a bug. This is just multi-threading in action. The objective of running tests in parallel is to maximize throughput. The implementations of the tests themselves don't require significant resources. It's the browsers that really devour resources. The goal is to run as many session as possible without causing the system to bog down. This concern is not the responsibility of the generic test framework. This should be handled by the scenario-specific implementation that runs on top.

Yes, Selenium Grid was originally designed for remote operation. As far as I know, this is true for every component of WebDriver. Why does the typical application of Grid preclude it from being used for local operations? You're advocating for the re-creation the functionality of Grid. What are the advantages of this approach that justify the time and effort this would require?


On Wednesday, June 13, 2018 at 12:25:51 AM UTC-7, Krishnan Mahadevan wrote:

Scott,

 

>>>> If I logged a bug with the TestNG team that stated, "I get 12 tests running simultaneously when I set the thread count to 10," they're likely to tell me that this is normal behavior. 

 

I am one of the committers in TestNG. Trust me, I am not going to come back to you and say that if you set a thread count of 10 and if you notice 12 tests running simultaneously that’s normal behavior. That is a bug. A straight forward bug. Thread-count of 10 in TestNG would mean that TestNG would at any given point in time only run 10 @Test annotated methods at a time. I say this because I know how TestNG works. So, if you have an example wherein you are seeing things otherwise, then it needs to be investigated and fixed. So please help share a sample for that.

 

>>>> Different browsers expend different amounts of system resources. If you're targeting multiple browsers with your automation, this requires driver-specific management of the maximum instances of any given browser.

 

Yes. Absolutely correct. But that doesn’t mean one would need to rely on a remote execution mechanism (which is what the Grid is actually meant for) to basically do that management when it can very well be managed by a sophisticated test runner (such as TestNG for example).

 

>>>> The ability to change the targeted driver and add new browsers by simply updating your configuration is huge.

A well-designed framework should be able to manage this by still letting you specify the browser flavor via a configuration and also specify if it’s a local or a remote run and yet achieve them by toggling between FirefoxDriver/ChromeDriver/InternetExplorerDriver etc., for local runs and using RemoteWebDriver only for remote runs. Its not that difficult.

 

>>>> The elimination of behavioral anomalies between local and remote operation avoids a lot of frustration.

 

I must correct you here. There are no behavioral anomalies between local and remote operation. The grid is just a sophisticated load distribution mechanism. Nothing more and nothing less.

If you take a closer look at the Selenium node implementation you will notice that it still resorts to invoking the same FirefoxDriver or ChromeDriver but via reflection. Just because a test runs a UI automation testcase locally by employing a selenium grid spawned via code, doesn’t get rid of any frustrations that managing a Grid is associated with.

Because things such as ephemeral port exhaustion, selenium node leaking memory due it running for a longer time are still going to come up in a remote execution environment which you will never see in a locally spun off grid via code and whose lifetime is short.

 

Thanks & Regards

Krishnan Mahadevan

 

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"

My Scribblings @ <a href="http://wakened-cognition.blogspot.com/" rel="nofollow" target="_blank" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fwakened-cognition.blogspot.com%2F\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHzOdYJCASIDF_28vQtkp9gnKAYSQ&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fwakened-cognition.blogspot.com%2F\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHzOdYJCASIDF_28vQtkp9gnKAYSQ&#39;;return true;">http://wakened-cognition.blogspot.com/

My Technical Scribbings @ <a href="http://rationaleemotions.wordpress.com/" rel="nofollow" target="_blank" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Frationaleemotions.wordpress.com%2F\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNEcBOKyRn0lpL8LDbBuyAlKdwgXwQ&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Frationaleemotions.wordpress.com%2F\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNEcBOKyRn0lpL8LDbBuyAlKdwgXwQ&#39;;return true;">http://rationaleemotions.wordpress.com/

 

From: <[hidden email]> on behalf of Scott Babcock <[hidden email]>
Reply-To: <[hidden email]>


Date: Wednesday, June 13, 2018 at 12:44 PM

To: Selenium Users <[hidden email]>


Subject: Re: [selenium-users] Re: Parallel execution

 

Krishnan,

 

Different browsers expend different amounts of system resources. If you're targeting multiple browsers with your automation, this requires driver-specific management of the maximum instances of any given browser. Why re-invent this, when Grid provides this as a standard feature? I don't know what exact effect the thread count value has on the inner workings of TestNG. This isn't something I need to understand. If I logged a bug with the TestNG team that stated, "I get 12 tests running simultaneously when I set the thread count to 10," they're likely to tell me that this is normal behavior. Why is this significant? My concern is to limit the maximum number of browsers open at any given time, which is exactly what Grid provides.

 

Rabbit hole? The framework fires up a local Grid in a matter of seconds. Performance has never been an issue. The ability to change the targeted driver and add new browsers by simply updating your configuration is huge. The elimination of behavioral anomalies between local and remote operation avoids a lot of frustration.

 

Regards,

= Scott =


On Tuesday, June 12, 2018 at 8:49:11 PM UTC-7, Krishnan Mahadevan wrote:

Scott,

 

>>>> It's quite common to see a run that specifies a thread count of 10 to end up launching 12 or more tests simultaneously, with a corresponding number of browser sessions.

That to me would be a straight forward bug either in the Test code that is responsible for browser instantiation or the underlying TestRunner. It should be fixed. For me that wouldn’t be a reason for trying to check for alternatives.

 

>>>> In my Selenium framework, I acquire drivers from a local instance of Selenium Grid.

Yes, I remember going down that rabbit hole myself a couple of years back. For local executions (which is mostly the case when you are doing test development and would like to see the browser kick off and watch your test in action to debug), requiring a local instance of Selenium Grid (the one that you spin off via your code, wherein you fire up a hub, fire up a node, wire them together) to come up before browser instances can be allocated to me sounds like too much of an ask.

 

Local executions should be seamless. They should be making use of the more specific RemoteWebDriver variants such as ChromeDriver, FirefoxDriver etc., instead of having to rely on RemoteWebDriver. From a framework perspective it makes sense to try and keep everything standard to always a RemoteWebDriver. In that case, one should try using the DriverService variant (but it’s a lot of overhead and one is better off with using ChromeDriver directly for e.g.,) Something like the below sample.

 

public static void main(String[] args) throws IOException {
  DriverService service = ChromeDriverService.createDefaultService();
  service.start();
  URL url = service.getUrl();
  RemoteWebDriver driver =
new RemoteWebDriver(url, new ChromeOptions());
  driver.get(
"<a href="http://www.google.com" rel="nofollow" target="_blank" onmousedown="this.href=&#39;http://www.google.com&#39;;return true;" onclick="this.href=&#39;http://www.google.com&#39;;return true;">http://www.google.com");
  System.
err.println("Title " + driver.getTitle());
  driver.quit();
  service.stop();
}

 

 

>>>> The Grid hub configuration provides explicit control over the maximum number of session that will be active at any given moment.

If this is the only reason why you are using a local grid, then you could consider alternatives. One such alternative would be to guard your browser instantiation and cleanup via methods that are guarded by Semaphores for e.g., Am sure there are other elegant ways of achieving this as well.

 

 

Thanks & Regards

Krishnan Mahadevan

 

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"

My Scribblings @ <a href="http://wakened-cognition.blogspot.com/" rel="nofollow" target="_blank" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fwakened-cognition.blogspot.com%2F\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHzOdYJCASIDF_28vQtkp9gnKAYSQ&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fwakened-cognition.blogspot.com%2F\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHzOdYJCASIDF_28vQtkp9gnKAYSQ&#39;;return true;">http://wakened-cognition.blogspot.com/

My Technical Scribbings @ <a href="http://rationaleemotions.wordpress.com/" rel="nofollow" target="_blank" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Frationaleemotions.wordpress.com%2F\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNEcBOKyRn0lpL8LDbBuyAlKdwgXwQ&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Frationaleemotions.wordpress.com%2F\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNEcBOKyRn0lpL8LDbBuyAlKdwgXwQ&#39;;return true;">http://rationaleemotions.wordpress.com/

 

From: <[hidden email]> on behalf of Scott Babcock <[hidden email]>
Reply-To: <[hidden email]>
Date: Wednesday, June 13, 2018 at 9:01 AM
To: Selenium Users <[hidden email]>
Subject: [selenium-users] Re: Parallel execution

 

Another challenge you'll probably run into with parallel execution in TestNG is that thread count isn't necessarily going limit the number of session that will be created to that exact count. It's quite common to see a run that specifies a thread count of 10 to end up launching 12 or more tests simultaneously, with a corresponding number of browser sessions. To keep from overtaxing your system resources, you end up dialing the thread count way down, which limits your throughput.

 

In my Selenium framework, I acquire drivers from a local instance of Selenium Grid. The Grid hub configuration provides explicit control over the maximum number of session that will be active at any given moment. This driver management strategy has several other benefits as well. All you need to do to switch to a different driver or add a new driver is to update your configuration. You never need to crack open your code.

 

If you're interested, the project is found here: [Selenium Foundation](<a href="https://github.com/Nordstrom/Selenium-Foundation" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgithub.com%2FNordstrom%2FSelenium-Foundation\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNGdcpQcQWvEXWh_rWtyqSaXrQc7DQ&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgithub.com%2FNordstrom%2FSelenium-Foundation\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNGdcpQcQWvEXWh_rWtyqSaXrQc7DQ&#39;;return true;">https://github.com/Nordstrom/Selenium-Foundation)


On Tuesday, June 12, 2018 at 4:52:54 AM UTC-7, Kuzhali Velmurugan wrote:

Hi,
 
I am trying to execute the test classes in parallel in Chrome instance.
I had set thread count as 3, three instances of browser got opened.
But the username and password gets kkeyed in in the same instance.
 
Below is the BaseSet up , where I initialize the driver:
 
public static WebDriver driver;

@Parameters({ "browserType" })
@BeforeClass(alwaysRun = true)
public void initializeTestBaseSetup(@Optional("chrome") String browserType) throws MalformedURLException {
    setDriver(browserType);
}

@AfterClass(alwaysRun = true)
public void baseSetupLogOut() {
   
driver.quit();
}

public WebDriver getDriver() {
   
return driver;
}
 
private void setDriver(String browserType) throws MalformedURLException {
   
switch (browserType) {
       
case "chrome":
           
driver = initChromeDriver();
           
break;
       
case "firefox":
           
driver = initFirefoxDriver();
           
break;
       
case "IE":
           
driver = initIEDriver();
           
break;
       
default:
           
driver = initChromeDriver();
    }
}

private WebDriver initChromeDriver() throws MalformedURLException {
   
if ("remote".equalsIgnoreCase(mode)) {
        DesiredCapabilities capability = DesiredCapabilities.chrome();
       
driver = new RemoteWebDriver(new URL(hubUrl), capability);
       
driver.manage().window().maximize();
    }
else if ("local".equalsIgnoreCase(mode)) {
        System.setProperty(
"webdriver.chrome.driver", "drivers/Chrome/chromedriver.exe");
        ChromeOptions chromeOptions =
new ChromeOptions();
        chromeOptions.addArguments(
"--start-maximized");
       
driver = new ChromeDriver(chromeOptions);
    }
else {
       
throw new IllegalArgumentException("Unsupported mode '" + mode + "'");
    }
   
driver.get(miningUrl);

   
return driver;
}
 
And I try to do login action, before class (this is in different class and test classes extend this class):
@BeforeClass(alwaysRun = true)
public void baseSetupLogin() {
   
commonUtils.login();
   
objDemoHomePage = new DemoHomePage(driver);
   
objLogin = new LoginPage(driver);
}
 
 
Kindly help me to resolve the problem and execute tests in parallel.
 
Thanks,
Kuzhali

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-user...@googlegroups.com.
To post to this group, send email to [hidden email].
To view this discussion on the web visit <a href="https://groups.google.com/d/msgid/selenium-users/484d7d40-3ac8-42a1-9515-b66e8c5fb9a0%40googlegroups.com?utm_medium=email&amp;utm_source=footer" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://groups.google.com/d/msgid/selenium-users/484d7d40-3ac8-42a1-9515-b66e8c5fb9a0%40googlegroups.com?utm_medium\x3demail\x26utm_source\x3dfooter&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/msgid/selenium-users/484d7d40-3ac8-42a1-9515-b66e8c5fb9a0%40googlegroups.com?utm_medium\x3demail\x26utm_source\x3dfooter&#39;;return true;">https://groups.google.com/d/msgid/selenium-users/484d7d40-3ac8-42a1-9515-b66e8c5fb9a0%40googlegroups.com.
For more options, visit <a href="https://groups.google.com/d/optout" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;">https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-user...@googlegroups.com.
To post to this group, send email to [hidden email].

To view this discussion on the web visit <a href="https://groups.google.com/d/msgid/selenium-users/87ee60a8-5b42-44e9-84bb-202cc8c91651%40googlegroups.com?utm_medium=email&amp;utm_source=footer" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://groups.google.com/d/msgid/selenium-users/87ee60a8-5b42-44e9-84bb-202cc8c91651%40googlegroups.com?utm_medium\x3demail\x26utm_source\x3dfooter&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/msgid/selenium-users/87ee60a8-5b42-44e9-84bb-202cc8c91651%40googlegroups.com?utm_medium\x3demail\x26utm_source\x3dfooter&#39;;return true;">https://groups.google.com/d/msgid/selenium-users/87ee60a8-5b42-44e9-84bb-202cc8c91651%40googlegroups.com.
For more options, visit <a href="https://groups.google.com/d/optout" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;">https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to <a href="javascript:" target="_blank" gdf-obfuscated-mailto="eo6RQQv1BQAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">selenium-user...@googlegroups.com.
To post to this group, send email to <a href="javascript:" target="_blank" gdf-obfuscated-mailto="eo6RQQv1BQAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">seleniu...@googlegroups.com.
To view this discussion on the web visit <a href="https://groups.google.com/d/msgid/selenium-users/53d4c694-f50e-4d05-ab1e-a9079fe5aab3%40googlegroups.com?utm_medium=email&amp;utm_source=footer" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://groups.google.com/d/msgid/selenium-users/53d4c694-f50e-4d05-ab1e-a9079fe5aab3%40googlegroups.com?utm_medium\x3demail\x26utm_source\x3dfooter&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/msgid/selenium-users/53d4c694-f50e-4d05-ab1e-a9079fe5aab3%40googlegroups.com?utm_medium\x3demail\x26utm_source\x3dfooter&#39;;return true;">https://groups.google.com/d/msgid/selenium-users/53d4c694-f50e-4d05-ab1e-a9079fe5aab3%40googlegroups.com.
For more options, visit <a href="https://groups.google.com/d/optout" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;">https://groups.google.com/d/optout.
--

Thanks & Regards
Krishnan Mahadevan

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"
My Scribblings @ <a href="http://wakened-cognition.blogspot.com/" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fwakened-cognition.blogspot.com%2F\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHzOdYJCASIDF_28vQtkp9gnKAYSQ&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fwakened-cognition.blogspot.com%2F\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHzOdYJCASIDF_28vQtkp9gnKAYSQ&#39;;return true;">http://wakened-cognition.blogspot.com/

My Technical Scribbings @ <a href="http://rationaleemotions.wordpress.com/" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Frationaleemotions.wordpress.com%2F\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNEcBOKyRn0lpL8LDbBuyAlKdwgXwQ&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Frationaleemotions.wordpress.com%2F\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNEcBOKyRn0lpL8LDbBuyAlKdwgXwQ&#39;;return true;">http://rationaleemotions.wordpress.com/

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/54427a6d-e1f6-47f1-bb5e-1648ab21b141%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Parallel execution

Krishnan Mahadevan
The remote operation for all the drivers is the server component (chromed river/gecko driver etc). Remote webdriver lays down the basics that are common across all webdriver implementation and the customisations take care of starting and stopping the server. I believe that is perhaps the more apt way of looking at the implementations. 

Sure, no second thoughts on if you answered the OP question. Not debating that aspect at all. 

Am only putting forth my point of view based on my experiences with building http://selion.io 

All said and done, I guess we can wrap up our discussion with "let's agree to disagree". 

On Wed 13 Jun, 2018, 22:35 Scott Babcock, <[hidden email]> wrote:
public class ChromeDriver extends RemoteWebDriver public class EdgeDriver extends RemoteWebDriver public class FirefoxDriver extends RemoteWebDriver public class InternetExplorerDriver extends RemoteWebDriver public class OperaDriver extends RemoteWebDriver public class SafariDriver extends RemoteWebDriver

Seems to me that it's all designed for remote operation. Not only are you proposing that folks should re-implement existing functionality, you're also suggesting that "developer" code should differ from "production" code. 

Aside from that, the OP's question regards driver management when running tests in parallel. I posted my observation regarding the 'static' modifier on his `driver` field and its affect on the behavior of his code. I then informed him that the `threadCount` setting isn't guaranteed to provided one-to-one control over the number of tests that are executing at any given moment when running in parallel. I pointed him at the solution I've used to achieve explicit control over the maximum number of browser sessions that will be active at any given moment. If the OP finds this useful, great. If not, perhaps someone else with a similar problem will. Regardless, I've provided accurate information and proven solutions.

On Wednesday, June 13, 2018 at 3:34:29 AM UTC-7, Krishnan Mahadevan wrote:
Not every component of webdriver was designed for remote execution. 

Selenium grid was the only one designed for remote execution and as far as I know ( from the RC days this is true ). 

There's a lot to the selenium grid than what you are suggesting. So it would be an understatement if one were to say that controlling the number of sessions in a different way would be equal to duplicating the selenium grid functionality. 

The idea is simple. Local executions are only used when a test is being created or built. For that one doesn't need anything more than a simple webdriver instantiation. 

All the benefits that you mentioned come into effect when one is basically running in a CI mode on when there's a build system involved which constantly runs tests. For that one wouldn't be using a programmatically spun off grid but would be routing their tests to an actually running grid in a remote environment. 

The idea is to use the tool for which it was meant for. 

A test and a data driven test are attributes of a test runner. Browser instantiation is completely separate from that. 

Building a simple logic that throttles instantiation for local executions ( this by itself is not required in my opinion because my premise is local execution is only for Dev mode and not for the actual test mode where tests are run in bulk) doesn't require any effort than some basic programming abilities ( which is anyways needed when one takes up the task of building a framework). 


On Wed 13 Jun, 2018, 15:00 Scott Babcock, <[hidden email]> wrote:
Krishnan,

If you specify thread count and data provider thread count together, you get wildly varying numbers of tests running at any given moment. I don't think this is a bug. This is just multi-threading in action. The objective of running tests in parallel is to maximize throughput. The implementations of the tests themselves don't require significant resources. It's the browsers that really devour resources. The goal is to run as many session as possible without causing the system to bog down. This concern is not the responsibility of the generic test framework. This should be handled by the scenario-specific implementation that runs on top.

Yes, Selenium Grid was originally designed for remote operation. As far as I know, this is true for every component of WebDriver. Why does the typical application of Grid preclude it from being used for local operations? You're advocating for the re-creation the functionality of Grid. What are the advantages of this approach that justify the time and effort this would require?


On Wednesday, June 13, 2018 at 12:25:51 AM UTC-7, Krishnan Mahadevan wrote:

Scott,

 

>>>> If I logged a bug with the TestNG team that stated, "I get 12 tests running simultaneously when I set the thread count to 10," they're likely to tell me that this is normal behavior. 

 

I am one of the committers in TestNG. Trust me, I am not going to come back to you and say that if you set a thread count of 10 and if you notice 12 tests running simultaneously that’s normal behavior. That is a bug. A straight forward bug. Thread-count of 10 in TestNG would mean that TestNG would at any given point in time only run 10 @Test annotated methods at a time. I say this because I know how TestNG works. So, if you have an example wherein you are seeing things otherwise, then it needs to be investigated and fixed. So please help share a sample for that.

 

>>>> Different browsers expend different amounts of system resources. If you're targeting multiple browsers with your automation, this requires driver-specific management of the maximum instances of any given browser.

 

Yes. Absolutely correct. But that doesn’t mean one would need to rely on a remote execution mechanism (which is what the Grid is actually meant for) to basically do that management when it can very well be managed by a sophisticated test runner (such as TestNG for example).

 

>>>> The ability to change the targeted driver and add new browsers by simply updating your configuration is huge.

A well-designed framework should be able to manage this by still letting you specify the browser flavor via a configuration and also specify if it’s a local or a remote run and yet achieve them by toggling between FirefoxDriver/ChromeDriver/InternetExplorerDriver etc., for local runs and using RemoteWebDriver only for remote runs. Its not that difficult.

 

>>>> The elimination of behavioral anomalies between local and remote operation avoids a lot of frustration.

 

I must correct you here. There are no behavioral anomalies between local and remote operation. The grid is just a sophisticated load distribution mechanism. Nothing more and nothing less.

If you take a closer look at the Selenium node implementation you will notice that it still resorts to invoking the same FirefoxDriver or ChromeDriver but via reflection. Just because a test runs a UI automation testcase locally by employing a selenium grid spawned via code, doesn’t get rid of any frustrations that managing a Grid is associated with.

Because things such as ephemeral port exhaustion, selenium node leaking memory due it running for a longer time are still going to come up in a remote execution environment which you will never see in a locally spun off grid via code and whose lifetime is short.

 

Thanks & Regards

Krishnan Mahadevan

 

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"

My Scribblings @ http://wakened-cognition.blogspot.com/

My Technical Scribbings @ http://rationaleemotions.wordpress.com/

 

From: <[hidden email]> on behalf of Scott Babcock <[hidden email]>
Reply-To: <[hidden email]>


Date: Wednesday, June 13, 2018 at 12:44 PM

To: Selenium Users <[hidden email]>


Subject: Re: [selenium-users] Re: Parallel execution

 

Krishnan,

 

Different browsers expend different amounts of system resources. If you're targeting multiple browsers with your automation, this requires driver-specific management of the maximum instances of any given browser. Why re-invent this, when Grid provides this as a standard feature? I don't know what exact effect the thread count value has on the inner workings of TestNG. This isn't something I need to understand. If I logged a bug with the TestNG team that stated, "I get 12 tests running simultaneously when I set the thread count to 10," they're likely to tell me that this is normal behavior. Why is this significant? My concern is to limit the maximum number of browsers open at any given time, which is exactly what Grid provides.

 

Rabbit hole? The framework fires up a local Grid in a matter of seconds. Performance has never been an issue. The ability to change the targeted driver and add new browsers by simply updating your configuration is huge. The elimination of behavioral anomalies between local and remote operation avoids a lot of frustration.

 

Regards,

= Scott =


On Tuesday, June 12, 2018 at 8:49:11 PM UTC-7, Krishnan Mahadevan wrote:

Scott,

 

>>>> It's quite common to see a run that specifies a thread count of 10 to end up launching 12 or more tests simultaneously, with a corresponding number of browser sessions.

That to me would be a straight forward bug either in the Test code that is responsible for browser instantiation or the underlying TestRunner. It should be fixed. For me that wouldn’t be a reason for trying to check for alternatives.

 

>>>> In my Selenium framework, I acquire drivers from a local instance of Selenium Grid.

Yes, I remember going down that rabbit hole myself a couple of years back. For local executions (which is mostly the case when you are doing test development and would like to see the browser kick off and watch your test in action to debug), requiring a local instance of Selenium Grid (the one that you spin off via your code, wherein you fire up a hub, fire up a node, wire them together) to come up before browser instances can be allocated to me sounds like too much of an ask.

 

Local executions should be seamless. They should be making use of the more specific RemoteWebDriver variants such as ChromeDriver, FirefoxDriver etc., instead of having to rely on RemoteWebDriver. From a framework perspective it makes sense to try and keep everything standard to always a RemoteWebDriver. In that case, one should try using the DriverService variant (but it’s a lot of overhead and one is better off with using ChromeDriver directly for e.g.,) Something like the below sample.

 

public static void main(String[] args) throws IOException {
  DriverService service = ChromeDriverService.createDefaultService();
  service.start();
  URL url = service.getUrl();
  RemoteWebDriver driver =
new RemoteWebDriver(url, new ChromeOptions());
  driver.get(
"http://www.google.com");
  System.
err.println("Title " + driver.getTitle());
  driver.quit();
  service.stop();
}

 

 

>>>> The Grid hub configuration provides explicit control over the maximum number of session that will be active at any given moment.

If this is the only reason why you are using a local grid, then you could consider alternatives. One such alternative would be to guard your browser instantiation and cleanup via methods that are guarded by Semaphores for e.g., Am sure there are other elegant ways of achieving this as well.

 

 

Thanks & Regards

Krishnan Mahadevan

 

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"

My Scribblings @ http://wakened-cognition.blogspot.com/

My Technical Scribbings @ http://rationaleemotions.wordpress.com/

 

From: <[hidden email]> on behalf of Scott Babcock <[hidden email]>
Reply-To: <[hidden email]>
Date: Wednesday, June 13, 2018 at 9:01 AM
To: Selenium Users <[hidden email]>
Subject: [selenium-users] Re: Parallel execution

 

Another challenge you'll probably run into with parallel execution in TestNG is that thread count isn't necessarily going limit the number of session that will be created to that exact count. It's quite common to see a run that specifies a thread count of 10 to end up launching 12 or more tests simultaneously, with a corresponding number of browser sessions. To keep from overtaxing your system resources, you end up dialing the thread count way down, which limits your throughput.

 

In my Selenium framework, I acquire drivers from a local instance of Selenium Grid. The Grid hub configuration provides explicit control over the maximum number of session that will be active at any given moment. This driver management strategy has several other benefits as well. All you need to do to switch to a different driver or add a new driver is to update your configuration. You never need to crack open your code.

 

If you're interested, the project is found here: [Selenium Foundation](https://github.com/Nordstrom/Selenium-Foundation)


On Tuesday, June 12, 2018 at 4:52:54 AM UTC-7, Kuzhali Velmurugan wrote:

Hi,
 
I am trying to execute the test classes in parallel in Chrome instance.
I had set thread count as 3, three instances of browser got opened.
But the username and password gets kkeyed in in the same instance.
 
Below is the BaseSet up , where I initialize the driver:
 
public static WebDriver driver;

@Parameters({ "browserType" })
@BeforeClass(alwaysRun = true)
public void initializeTestBaseSetup(@Optional("chrome") String browserType) throws MalformedURLException {
    setDriver(browserType);
}

@AfterClass(alwaysRun = true)
public void baseSetupLogOut() {
   
driver.quit();
}

public WebDriver getDriver() {
   
return driver;
}
 
private void setDriver(String browserType) throws MalformedURLException {
   
switch (browserType) {
       
case "chrome":
           
driver = initChromeDriver();
           
break;
       
case "firefox":
           
driver = initFirefoxDriver();
           
break;
       
case "IE":
           
driver = initIEDriver();
           
break;
       
default:
           
driver = initChromeDriver();
    }
}

private WebDriver initChromeDriver() throws MalformedURLException {
   
if ("remote".equalsIgnoreCase(mode)) {
        DesiredCapabilities capability = DesiredCapabilities.chrome();
       
driver = new RemoteWebDriver(new URL(hubUrl), capability);
       
driver.manage().window().maximize();
    }
else if ("local".equalsIgnoreCase(mode)) {
        System.setProperty(
"webdriver.chrome.driver", "drivers/Chrome/chromedriver.exe");
        ChromeOptions chromeOptions =
new ChromeOptions();
        chromeOptions.addArguments(
"--start-maximized");
       
driver = new ChromeDriver(chromeOptions);
    }
else {
       
throw new IllegalArgumentException("Unsupported mode '" + mode + "'");
    }
   
driver.get(miningUrl);

   
return driver;
}
 
And I try to do login action, before class (this is in different class and test classes extend this class):
@BeforeClass(alwaysRun = true)
public void baseSetupLogin() {
   
commonUtils.login();
   
objDemoHomePage = new DemoHomePage(driver);
   
objLogin = new LoginPage(driver);
}
 
 
Kindly help me to resolve the problem and execute tests in parallel.
 
Thanks,
Kuzhali

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/484d7d40-3ac8-42a1-9515-b66e8c5fb9a0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
--

Thanks & Regards
Krishnan Mahadevan

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"
My Scribblings @ http://wakened-cognition.blogspot.com/

My Technical Scribbings @ http://rationaleemotions.wordpress.com/

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/54427a6d-e1f6-47f1-bb5e-1648ab21b141%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--

Thanks & Regards
Krishnan Mahadevan

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"
My Scribblings @ http://wakened-cognition.blogspot.com/

My Technical Scribbings @ http://rationaleemotions.wordpress.com/

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/CANikZLnCpnEuA5D6MNeGDRmPSuwgN60pjQ3Jg0Vg52Wvo_jUqQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Parallel execution

Kuzhali Velmurugan
In reply to this post by Kuzhali Velmurugan
Hi,

Removing the static reference to driver solved the issue.

Thank you Scott and Krishnan.



On Tuesday, 12 June 2018 17:22:54 UTC+5:30, Kuzhali Velmurugan wrote:
Hi,

I am trying to execute the test classes in parallel in Chrome instance.
I had set thread count as 3, three instances of browser got opened.
But the username and password gets kkeyed in in the same instance.

Below is the BaseSet up , where I initialize the driver:

public static WebDriver driver;

@Parameters({ "browserType" })
@BeforeClass(alwaysRun = true)
public void initializeTestBaseSetup(@Optional("chrome") String browserType) throws MalformedURLException {
setDriver(browserType);
}

@AfterClass(alwaysRun = true)
public void baseSetupLogOut() {
driver.quit();
}

public WebDriver getDriver() {
return driver;
}

private void setDriver(String browserType) throws MalformedURLException {
switch (browserType) {
case "chrome":
driver = initChromeDriver();
break;
case "firefox":
driver = initFirefoxDriver();
break;
case "IE":
driver = initIEDriver();
break;
default:
driver = initChromeDriver();
}
}

private WebDriver initChromeDriver() throws MalformedURLException {
if ("remote".equalsIgnoreCase(mode)) {
DesiredCapabilities capability = DesiredCapabilities.chrome();
driver = new RemoteWebDriver(new URL(hubUrl), capability);
driver.manage().window().maximize();
} else if ("local".equalsIgnoreCase(mode)) {
System.setProperty("webdriver.chrome.driver", "drivers/Chrome/chromedriver.exe");
ChromeOptions chromeOptions = new ChromeOptions();
chromeOptions.addArguments("--start-maximized");
driver = new ChromeDriver(chromeOptions);
} else {
throw new IllegalArgumentException("Unsupported mode '" + mode + "'");
}
driver.get(miningUrl);

return driver;
}

And I try to do login action, before class (this is in different class and test classes extend this class):
@BeforeClass(alwaysRun = true)
public void baseSetupLogin() {
commonUtils.login();
objDemoHomePage = new DemoHomePage(driver);
objLogin = new LoginPage(driver);
}


Kindly help me to resolve the problem and execute tests in parallel.

Thanks,
Kuzhali

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/f72fa780-9131-42a1-a24c-e6443841b6cc%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Parallel execution

Kuzhali Velmurugan
In reply to this post by Kuzhali Velmurugan
Hi,

I am facing another issue. 

Null Pointer Exception is being thrown in screenshot capture method. Is it because the driver object is not initialized properly?

public class ScreenshotOnFailure extends BaseSetup implements IHookable {

@Override
public void run(IHookCallBack callBack, ITestResult testResult) {

callBack.runTestMethod(testResult);
if (testResult.getThrowable() != null) {
try {
takeScreenShot(testResult.getMethod().getMethodName());
}
catch (IOException e) {
e.printStackTrace();
}
}
}

@Attachment(value = "Failure in method {0}", type = "image/png")
private byte[] takeScreenShot(String methodName) throws IOException {
return ((TakesScreenshot) driver).getScreenshotAs(OutputType.BYTES);
}


The driver is being used from the base class.

Getting exception at the highlighted line.
I have used it as a listener to take screenshot on failure.

Kindly share your thoughts.


Thanks,
Poonkuzhali

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/7fd57389-4729-425d-86fd-f3e0f11d03ed%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Parallel execution

Krishnan Mahadevan
Do you see the problem when you use TestNG 6.14.3 (latest released version of TestNG)

On Thu 14 Jun, 2018, 17:41 Kuzhali Velmurugan, <[hidden email]> wrote:
Hi,

I am facing another issue. 

Null Pointer Exception is being thrown in screenshot capture method. Is it because the driver object is not initialized properly?

public class ScreenshotOnFailure extends BaseSetup implements IHookable {

@Override
public void run(IHookCallBack callBack, ITestResult testResult) {

callBack.runTestMethod(testResult);
if (testResult.getThrowable() != null) {
try {
takeScreenShot(testResult.getMethod().getMethodName());
}
catch (IOException e) {
e.printStackTrace();
}
}
}

@Attachment(value = "Failure in method {0}", type = "image/png")
private byte[] takeScreenShot(String methodName) throws IOException {
return ((TakesScreenshot) driver).getScreenshotAs(OutputType.BYTES);
}


The driver is being used from the base class.

Getting exception at the highlighted line.
I have used it as a listener to take screenshot on failure.

Kindly share your thoughts.


Thanks,
Poonkuzhali

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/7fd57389-4729-425d-86fd-f3e0f11d03ed%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--

Thanks & Regards
Krishnan Mahadevan

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"
My Scribblings @ http://wakened-cognition.blogspot.com/

My Technical Scribbings @ http://rationaleemotions.wordpress.com/

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/CANikZLnUq1AY6br8M0RO9yDyigA3Pzn%2BS0dps-y_W4f%3DK7biBw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Parallel execution

Kuzhali Velmurugan
Yes, I face the issue while using TestNG, have added the listener in the XML file. 

But am not using the latest version of TestNG.

On Thu, 14 Jun 2018 at 8:37 PM, ⇜Krishnan Mahadevan⇝ <[hidden email]> wrote:
Do you see the problem when you use TestNG 6.14.3 (latest released version of TestNG)

On Thu 14 Jun, 2018, 17:41 Kuzhali Velmurugan, <[hidden email]> wrote:
Hi,

I am facing another issue. 

Null Pointer Exception is being thrown in screenshot capture method. Is it because the driver object is not initialized properly?

public class ScreenshotOnFailure extends BaseSetup implements IHookable {

@Override
public void run(IHookCallBack callBack, ITestResult testResult) {

callBack.runTestMethod(testResult);
if (testResult.getThrowable() != null) {
try {
takeScreenShot(testResult.getMethod().getMethodName());
}
catch (IOException e) {
e.printStackTrace();
}
}
}

@Attachment(value = "Failure in method {0}", type = "image/png")
private byte[] takeScreenShot(String methodName) throws IOException {
return ((TakesScreenshot) driver).getScreenshotAs(OutputType.BYTES);
}


The driver is being used from the base class.

Getting exception at the highlighted line.
I have used it as a listener to take screenshot on failure.

Kindly share your thoughts.


Thanks,
Poonkuzhali

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].

To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/7fd57389-4729-425d-86fd-f3e0f11d03ed%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--

Thanks & Regards
Krishnan Mahadevan

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"
My Scribblings @ http://wakened-cognition.blogspot.com/

My Technical Scribbings @ http://rationaleemotions.wordpress.com/

--
You received this message because you are subscribed to a topic in the Google Groups "Selenium Users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/selenium-users/cEBYO-RaYis/unsubscribe.
To unsubscribe from this group and all its topics, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/CANikZLnUq1AY6br8M0RO9yDyigA3Pzn%2BS0dps-y_W4f%3DK7biBw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
--

Regards,
V.Poonkuzhali

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/CANOO4NbXRsd14pC9opKfwwfNdmm-CBE0bN136-cqNv_EeVi4nw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Parallel execution

Krishnan Mahadevan
Please retry using 6.14.3 and kindly post back your findings. 

On Thu 14 Jun, 2018, 22:11 Kuzhali Velmurugan, <[hidden email]> wrote:
Yes, I face the issue while using TestNG, have added the listener in the XML file. 

But am not using the latest version of TestNG.

On Thu, 14 Jun 2018 at 8:37 PM, ⇜Krishnan Mahadevan⇝ <[hidden email]> wrote:
Do you see the problem when you use TestNG 6.14.3 (latest released version of TestNG)

On Thu 14 Jun, 2018, 17:41 Kuzhali Velmurugan, <[hidden email]> wrote:
Hi,

I am facing another issue. 

Null Pointer Exception is being thrown in screenshot capture method. Is it because the driver object is not initialized properly?

public class ScreenshotOnFailure extends BaseSetup implements IHookable {

@Override
public void run(IHookCallBack callBack, ITestResult testResult) {

callBack.runTestMethod(testResult);
if (testResult.getThrowable() != null) {
try {
takeScreenShot(testResult.getMethod().getMethodName());
}
catch (IOException e) {
e.printStackTrace();
}
}
}

@Attachment(value = "Failure in method {0}", type = "image/png")
private byte[] takeScreenShot(String methodName) throws IOException {
return ((TakesScreenshot) driver).getScreenshotAs(OutputType.BYTES);
}


The driver is being used from the base class.

Getting exception at the highlighted line.
I have used it as a listener to take screenshot on failure.

Kindly share your thoughts.


Thanks,
Poonkuzhali

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].

To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/7fd57389-4729-425d-86fd-f3e0f11d03ed%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--

Thanks & Regards
Krishnan Mahadevan

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"
My Scribblings @ http://wakened-cognition.blogspot.com/

My Technical Scribbings @ http://rationaleemotions.wordpress.com/

--
You received this message because you are subscribed to a topic in the Google Groups "Selenium Users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/selenium-users/cEBYO-RaYis/unsubscribe.
To unsubscribe from this group and all its topics, send an email to [hidden email].

To post to this group, send email to [hidden email].

For more options, visit https://groups.google.com/d/optout.
--

Regards,
V.Poonkuzhali

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/CANOO4NbXRsd14pC9opKfwwfNdmm-CBE0bN136-cqNv_EeVi4nw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
--

Thanks & Regards
Krishnan Mahadevan

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"
My Scribblings @ http://wakened-cognition.blogspot.com/

My Technical Scribbings @ http://rationaleemotions.wordpress.com/

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/CANikZLmgaUPxFq2DeK23j6Dz-cqtr3ztbSojVnPdqF-p8fV0Nw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Parallel execution

Kuzhali Velmurugan
Ok, Thank you. I will try with that version and post on Tuesday(we have long weekend). 

On Thu, 14 Jun 2018 at 10:15 PM, ⇜Krishnan Mahadevan⇝ <[hidden email]> wrote:
Please retry using 6.14.3 and kindly post back your findings. 

On Thu 14 Jun, 2018, 22:11 Kuzhali Velmurugan, <[hidden email]> wrote:
Yes, I face the issue while using TestNG, have added the listener in the XML file. 

But am not using the latest version of TestNG.

On Thu, 14 Jun 2018 at 8:37 PM, ⇜Krishnan Mahadevan⇝ <[hidden email]> wrote:
Do you see the problem when you use TestNG 6.14.3 (latest released version of TestNG)

On Thu 14 Jun, 2018, 17:41 Kuzhali Velmurugan, <[hidden email]> wrote:
Hi,

I am facing another issue. 

Null Pointer Exception is being thrown in screenshot capture method. Is it because the driver object is not initialized properly?

public class ScreenshotOnFailure extends BaseSetup implements IHookable {

@Override
public void run(IHookCallBack callBack, ITestResult testResult) {

callBack.runTestMethod(testResult);
if (testResult.getThrowable() != null) {
try {
takeScreenShot(testResult.getMethod().getMethodName());
}
catch (IOException e) {
e.printStackTrace();
}
}
}

@Attachment(value = "Failure in method {0}", type = "image/png")
private byte[] takeScreenShot(String methodName) throws IOException {
return ((TakesScreenshot) driver).getScreenshotAs(OutputType.BYTES);
}


The driver is being used from the base class.

Getting exception at the highlighted line.
I have used it as a listener to take screenshot on failure.

Kindly share your thoughts.


Thanks,
Poonkuzhali

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].

To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/7fd57389-4729-425d-86fd-f3e0f11d03ed%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--

Thanks & Regards
Krishnan Mahadevan

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"
My Scribblings @ http://wakened-cognition.blogspot.com/

My Technical Scribbings @ http://rationaleemotions.wordpress.com/

--
You received this message because you are subscribed to a topic in the Google Groups "Selenium Users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/selenium-users/cEBYO-RaYis/unsubscribe.
To unsubscribe from this group and all its topics, send an email to [hidden email].

To post to this group, send email to [hidden email].

For more options, visit https://groups.google.com/d/optout.
--

Regards,
V.Poonkuzhali

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].

For more options, visit https://groups.google.com/d/optout.
--

Thanks & Regards
Krishnan Mahadevan

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"
My Scribblings @ http://wakened-cognition.blogspot.com/

My Technical Scribbings @ http://rationaleemotions.wordpress.com/

--
You received this message because you are subscribed to a topic in the Google Groups "Selenium Users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/selenium-users/cEBYO-RaYis/unsubscribe.
To unsubscribe from this group and all its topics, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/CANikZLmgaUPxFq2DeK23j6Dz-cqtr3ztbSojVnPdqF-p8fV0Nw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
--

Regards,
V.Poonkuzhali

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/CANOO4NZt%2Bxaa_z62e%3DB6T09nHnkt%2BKZQ%2BuZsPOUur15VfFxohA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Parallel execution

Kuzhali Velmurugan
Hi,

It didnt seem to work with that version of testNG (6.14.3).

On Thursday, 14 June 2018 22:21:40 UTC+5:30, Kuzhali Velmurugan wrote:
Ok, Thank you. I will try with that version and post on Tuesday(we have long weekend). 

On Thu, 14 Jun 2018 at 10:15 PM, ⇜Krishnan Mahadevan⇝ <[hidden email]> wrote:
Please retry using 6.14.3 and kindly post back your findings. 

On Thu 14 Jun, 2018, 22:11 Kuzhali Velmurugan, <[hidden email]> wrote:
Yes, I face the issue while using TestNG, have added the listener in the XML file. 

But am not using the latest version of TestNG.

On Thu, 14 Jun 2018 at 8:37 PM, ⇜Krishnan Mahadevan⇝ <[hidden email]> wrote:
Do you see the problem when you use TestNG 6.14.3 (latest released version of TestNG)

On Thu 14 Jun, 2018, 17:41 Kuzhali Velmurugan, <[hidden email]> wrote:
Hi,

I am facing another issue. 

Null Pointer Exception is being thrown in screenshot capture method. Is it because the driver object is not initialized properly?

public class ScreenshotOnFailure extends BaseSetup implements IHookable {

@Override
public void run(IHookCallBack callBack, ITestResult testResult) {

callBack.runTestMethod(testResult);
if (testResult.getThrowable() != null) {
try {
takeScreenShot(testResult.getMethod().getMethodName());
}
catch (IOException e) {
e.printStackTrace();
}
}
}

@Attachment(value = "Failure in method {0}", type = "image/png")
private byte[] takeScreenShot(String methodName) throws IOException {
return ((TakesScreenshot) driver).getScreenshotAs(OutputType.BYTES);
}


The driver is being used from the base class.

Getting exception at the highlighted line.
I have used it as a listener to take screenshot on failure.

Kindly share your thoughts.


Thanks,
Poonkuzhali

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].

To post to this group, send email to [hidden email].
To view this discussion on the web visit <a href="https://groups.google.com/d/msgid/selenium-users/7fd57389-4729-425d-86fd-f3e0f11d03ed%40googlegroups.com?utm_medium=email&amp;utm_source=footer" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://groups.google.com/d/msgid/selenium-users/7fd57389-4729-425d-86fd-f3e0f11d03ed%40googlegroups.com?utm_medium\x3demail\x26utm_source\x3dfooter&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/msgid/selenium-users/7fd57389-4729-425d-86fd-f3e0f11d03ed%40googlegroups.com?utm_medium\x3demail\x26utm_source\x3dfooter&#39;;return true;">https://groups.google.com/d/msgid/selenium-users/7fd57389-4729-425d-86fd-f3e0f11d03ed%40googlegroups.com.
For more options, visit <a href="https://groups.google.com/d/optout" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;">https://groups.google.com/d/optout.
--

Thanks & Regards
Krishnan Mahadevan

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"
My Scribblings @ <a href="http://wakened-cognition.blogspot.com/" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fwakened-cognition.blogspot.com%2F\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHzOdYJCASIDF_28vQtkp9gnKAYSQ&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fwakened-cognition.blogspot.com%2F\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHzOdYJCASIDF_28vQtkp9gnKAYSQ&#39;;return true;">http://wakened-cognition.blogspot.com/

My Technical Scribbings @ <a href="http://rationaleemotions.wordpress.com/" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Frationaleemotions.wordpress.com%2F\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNEcBOKyRn0lpL8LDbBuyAlKdwgXwQ&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Frationaleemotions.wordpress.com%2F\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNEcBOKyRn0lpL8LDbBuyAlKdwgXwQ&#39;;return true;">http://rationaleemotions.wordpress.com/

--
You received this message because you are subscribed to a topic in the Google Groups "Selenium Users" group.
To unsubscribe from this topic, visit <a href="https://groups.google.com/d/topic/selenium-users/cEBYO-RaYis/unsubscribe" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://groups.google.com/d/topic/selenium-users/cEBYO-RaYis/unsubscribe&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/topic/selenium-users/cEBYO-RaYis/unsubscribe&#39;;return true;">https://groups.google.com/d/topic/selenium-users/cEBYO-RaYis/unsubscribe.
To unsubscribe from this group and all its topics, send an email to [hidden email].

To post to this group, send email to [hidden email].
To view this discussion on the web visit <a href="https://groups.google.com/d/msgid/selenium-users/CANikZLnUq1AY6br8M0RO9yDyigA3Pzn%2BS0dps-y_W4f%3DK7biBw%40mail.gmail.com?utm_medium=email&amp;utm_source=footer" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://groups.google.com/d/msgid/selenium-users/CANikZLnUq1AY6br8M0RO9yDyigA3Pzn%2BS0dps-y_W4f%3DK7biBw%40mail.gmail.com?utm_medium\x3demail\x26utm_source\x3dfooter&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/msgid/selenium-users/CANikZLnUq1AY6br8M0RO9yDyigA3Pzn%2BS0dps-y_W4f%3DK7biBw%40mail.gmail.com?utm_medium\x3demail\x26utm_source\x3dfooter&#39;;return true;">https://groups.google.com/d/msgid/selenium-users/CANikZLnUq1AY6br8M0RO9yDyigA3Pzn%2BS0dps-y_W4f%3DK7biBw%40mail.gmail.com.

For more options, visit <a href="https://groups.google.com/d/optout" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;">https://groups.google.com/d/optout.
--

Regards,
V.Poonkuzhali

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit <a href="https://groups.google.com/d/msgid/selenium-users/CANOO4NbXRsd14pC9opKfwwfNdmm-CBE0bN136-cqNv_EeVi4nw%40mail.gmail.com?utm_medium=email&amp;utm_source=footer" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://groups.google.com/d/msgid/selenium-users/CANOO4NbXRsd14pC9opKfwwfNdmm-CBE0bN136-cqNv_EeVi4nw%40mail.gmail.com?utm_medium\x3demail\x26utm_source\x3dfooter&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/msgid/selenium-users/CANOO4NbXRsd14pC9opKfwwfNdmm-CBE0bN136-cqNv_EeVi4nw%40mail.gmail.com?utm_medium\x3demail\x26utm_source\x3dfooter&#39;;return true;">https://groups.google.com/d/msgid/selenium-users/CANOO4NbXRsd14pC9opKfwwfNdmm-CBE0bN136-cqNv_EeVi4nw%40mail.gmail.com.

For more options, visit <a href="https://groups.google.com/d/optout" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;">https://groups.google.com/d/optout.
--

Thanks & Regards
Krishnan Mahadevan

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"
My Scribblings @ <a href="http://wakened-cognition.blogspot.com/" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fwakened-cognition.blogspot.com%2F\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHzOdYJCASIDF_28vQtkp9gnKAYSQ&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fwakened-cognition.blogspot.com%2F\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHzOdYJCASIDF_28vQtkp9gnKAYSQ&#39;;return true;">http://wakened-cognition.blogspot.com/

My Technical Scribbings @ <a href="http://rationaleemotions.wordpress.com/" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Frationaleemotions.wordpress.com%2F\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNEcBOKyRn0lpL8LDbBuyAlKdwgXwQ&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Frationaleemotions.wordpress.com%2F\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNEcBOKyRn0lpL8LDbBuyAlKdwgXwQ&#39;;return true;">http://rationaleemotions.wordpress.com/

--
You received this message because you are subscribed to a topic in the Google Groups "Selenium Users" group.
To unsubscribe from this topic, visit <a href="https://groups.google.com/d/topic/selenium-users/cEBYO-RaYis/unsubscribe" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://groups.google.com/d/topic/selenium-users/cEBYO-RaYis/unsubscribe&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/topic/selenium-users/cEBYO-RaYis/unsubscribe&#39;;return true;">https://groups.google.com/d/topic/selenium-users/cEBYO-RaYis/unsubscribe.
To unsubscribe from this group and all its topics, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit <a href="https://groups.google.com/d/msgid/selenium-users/CANikZLmgaUPxFq2DeK23j6Dz-cqtr3ztbSojVnPdqF-p8fV0Nw%40mail.gmail.com?utm_medium=email&amp;utm_source=footer" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://groups.google.com/d/msgid/selenium-users/CANikZLmgaUPxFq2DeK23j6Dz-cqtr3ztbSojVnPdqF-p8fV0Nw%40mail.gmail.com?utm_medium\x3demail\x26utm_source\x3dfooter&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/msgid/selenium-users/CANikZLmgaUPxFq2DeK23j6Dz-cqtr3ztbSojVnPdqF-p8fV0Nw%40mail.gmail.com?utm_medium\x3demail\x26utm_source\x3dfooter&#39;;return true;">https://groups.google.com/d/msgid/selenium-users/CANikZLmgaUPxFq2DeK23j6Dz-cqtr3ztbSojVnPdqF-p8fV0Nw%40mail.gmail.com.
For more options, visit <a href="https://groups.google.com/d/optout" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;">https://groups.google.com/d/optout.
--

Regards,
V.Poonkuzhali

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/ae194197-eb1d-49e9-9d9f-792480af08ff%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Parallel execution

Krishnan Mahadevan

Please share a full fledged simple standalone test, that can be used to reproduce the problem.

 

Thanks & Regards

Krishnan Mahadevan

 

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"

My Scribblings @ http://wakened-cognition.blogspot.com/

My Technical Scribbings @ http://rationaleemotions.wordpress.com/

 

From: <[hidden email]> on behalf of Kuzhali Velmurugan <[hidden email]>
Reply-To: <[hidden email]>
Date: Friday, June 22, 2018 at 6:10 PM
To: Selenium Users <[hidden email]>
Subject: Re: [selenium-users] Re: Parallel execution

 

Hi,

 

It didnt seem to work with that version of testNG (6.14.3).

On Thursday, 14 June 2018 22:21:40 UTC+5:30, Kuzhali Velmurugan wrote:

Ok, Thank you. I will try with that version and post on Tuesday(we have long weekend). 

 

On Thu, 14 Jun 2018 at 10:15 PM, Krishnan Mahadevan <[hidden email]> wrote:

Please retry using 6.14.3 and kindly post back your findings. 

On Thu 14 Jun, 2018, 22:11 Kuzhali Velmurugan, <[hidden email]> wrote:

Yes, I face the issue while using TestNG, have added the listener in the XML file. 

 

But am not using the latest version of TestNG.

 

On Thu, 14 Jun 2018 at 8:37 PM, Krishnan Mahadevan <[hidden email]> wrote:

Do you see the problem when you use TestNG 6.14.3 (latest released version of TestNG)

On Thu 14 Jun, 2018, 17:41 Kuzhali Velmurugan, <[hidden email]> wrote:

Hi,

 

I am facing another issue. 

 

Null Pointer Exception is being thrown in screenshot capture method. Is it because the driver object is not initialized properly?

 

public class ScreenshotOnFailure extends BaseSetup implements IHookable {
 
@Override
public void run(IHookCallBack callBack, ITestResult testResult) {

    callBack.runTestMethod(testResult);
   
if (testResult.getThrowable() != null) {
       
try {
           
takeScreenShot(testResult.getMethod().getMethodName());
        }
catch (IOException e) {
            e.printStackTrace();
        }
    }
}

@Attachment(value = "Failure in method {0}", type = "image/png")
private byte[] takeScreenShot(String methodName) throws IOException {
   
return ((TakesScreenshot) driver).getScreenshotAs(OutputType.BYTES);
}

 

 

The driver is being used from the base class.

 

Getting exception at the highlighted line.

I have used it as a listener to take screenshot on failure.

 

Kindly share your thoughts.

 

 

Thanks,
Poonkuzhali

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.

To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].


To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/7fd57389-4729-425d-86fd-f3e0f11d03ed%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--

Thanks & Regards
Krishnan Mahadevan

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"
My Scribblings @ http://wakened-cognition.blogspot.com/

My Technical Scribbings @ http://rationaleemotions.wordpress.com/

--

You received this message because you are subscribed to a topic in the Google Groups "Selenium Users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/selenium-users/cEBYO-RaYis/unsubscribe.
To unsubscribe from this group and all its topics, send an email to [hidden email].


To post to this group, send email to [hidden email].


For more options, visit https://groups.google.com/d/optout.

--

 

Regards,

V.Poonkuzhali

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].


For more options, visit https://groups.google.com/d/optout.

--

Thanks & Regards
Krishnan Mahadevan

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"
My Scribblings @ http://wakened-cognition.blogspot.com/

My Technical Scribbings @ http://rationaleemotions.wordpress.com/

--
You received this message because you are subscribed to a topic in the Google Groups "Selenium Users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/selenium-users/cEBYO-RaYis/unsubscribe.
To unsubscribe from this group and all its topics, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/CANikZLmgaUPxFq2DeK23j6Dz-cqtr3ztbSojVnPdqF-p8fV0Nw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

--

 

Regards,

V.Poonkuzhali

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/ae194197-eb1d-49e9-9d9f-792480af08ff%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/45170D48-B6BF-45C9-AD1C-2C511C17F827%40gmail.com.
For more options, visit https://groups.google.com/d/optout.
12