Showing posts with label Selenium Grid 2. Show all posts
Showing posts with label Selenium Grid 2. Show all posts

What is JSON?
"JavaScript Object Notation" is full form of JSON and it is best way to store information in an organized, easy-to-access and easy to read and understand manner. Here we can use it to store selenium grid config parameters.

Earlier we learnt, How to start single node on one machine as described in THIS POST. Now our next question is "can we run multiple selenium grid nodes on same machine?". Answer is yes. Selenium grid allows us to run multiple nodes on same machine. In general, It is not required to run multiple nodes on same machine as we can control number of browsers as described in THIS POST and number of browser sessions in THIS POST. So it is easy to configure one node on one machine and run test on it as per requirements. But still let's see an example of running multiple nodes on same machine.

"timeout" is node configuration parameter using which you can set timeout for selenium grid node browser session. If you set "-timeout 20000" and run test, If node browser not receiving any command and stay ideal for 20 seconds then it will be closed automatically by -timeout parameter. That means it tells node browser -> "wait max 20 seconds to receive any command else close browser and clear session". Lets take practical example to understand "timeout" clearly.

We learnt about "maxInstances" in my PREVIOUS POST. "maxSession" is another configuration parameter which helps to set max allowed sessions to run at a time on that specific node. Here session means number of concurrent browsers in terms of all browser. It will not allow that specific node to open browser more than value of "maxSession". Let's understand with very simple example scenario.

"maxInstances" is configuration parameter which is used during selenium grid 2 node configuration. Using "maxInstances" in selenium grid 2, We can set "how many max number of same browser instances are allowed to open and run software test at same time". "maxInstances" tells node machine to not allow more than allowed instances on that specific machine at the same time. Lets discuss one example to cleat your doubts.

In my previous post, We learnt how to execute selenium WebDriver single software automation test in multiple browsers in parallel using Selenium Grid 2. We had used "parameter" tag in testng.xml file to feed browser name in which your software automation test needs to run in parallel. Instead of using @Parameters, We can use @DataProvider annotation method to feed browser names and run selenium WebDriver test in parallel using selenium Grid 2.

Main advantage of selenium grid is we can run webdriver software test cases in parallel using selenium grid 2 environment to reduce software test execution time as described in THIS POST. Also It helps us to perform compatibility testing as it is supporting multiple browsers too. Earlier we have configured selenium grid 2 hub in THIS POST and selenium grid nodes in THIS POST in just single machine. Now lets try to use this environment to execute webdriver software automation test cases in parallel.

As described In my EARLIER POST, Selenium grid 2 Is useful to execute webdriver software tests on multiple nodes In parallel. So we need to set up selenium grid 2 nodes for webdriver software test execution. But before that, Your selenium grid hub should be configured and in running mode as described in my PREVIOUS POST. Now lets configure selenium grid 2 single node to execute webdriver software automation tests in parallel in selenium grid.

This selenium grid 2 tutorial will guide you how to use selenium grid 2 to perform distributed software test automation in order to speedup software test execution process. Using selenium grid 2, You can execute your software automation test in different OS, different versions of browser and execute software automation tests in parallel. Follow the tutorial links given at bellow to learn selenium grid 2 from scratch.

Selenium Grid 2 Tutorial


We learnt what is Selenium Grid 2 and when to use it in PREVIOUS POST. Selenium Grid is another project of selenium so you need to configure selenium grid 2 from scratch to execute selenium webdriver software test cases parallel in grid. Let's try to configure selenium grid In single machine and then we will run selenium webdriver tests In It.

Earlier we learnt selenium WebDriver/Selenium 2 tutorials with practical examples and you can find all webdriver tutorials links on THIS PAGE. Selenium Grid 2 may be new for most of you but you must needs to learn It because If you wants to run your selenium software tests In multiple browser versions and OS parallel then you need Selenium Grid 2. Let's try to understand what Is selenium Grid and when to use It.