When should I use Selenium Grid?
Watch the answer for this Selenium Interview Question in a detailed manner in the below youtube video:
Note: Don’t forget to subscribe to my Youtube channel here: Click here
Notes used for explanation in this Youtube video are provided after the video:
Notes used in the above Youtube Video:
The purpose of Selenium Grid is:
- > To save execution time
- – When there are huge number of tests taking long time for execution, Selenium Grid can distribute these tests across multiple machines and execute them simultaneously for reducing the execution time.
- – Example: Lets say, we have 10 tests where each test takes 1 minute each. If you are not using Selenium Grid, then one test will be executed after another in the same machine and hence takes 10 minutes of time for executing 10 tests. But if we use Selenium Grid to distribute these tests across 5 machines, then 5 tests will be executed at the same time and hence it takes only 2 minutes for executing all the 10 tests.
Additionally you can mention the below to add more value to your answer:
- > Selenium Grid is a concept/set of configurations,using which we can distribute the multiple tests across multiple machines,having multiple operating systems and multiple browsers for execution.
- > We configure Hub and Node machines
- – In Hub, we will place the Centralized code
- – From Hub, the tests will be distributed across multiple node machines
- – Node machines can belong to different operating systems like Windows, Linux or Mac
- – Also we can distribute the tests across multiple browsers in the same node machine too
- > While TestNG implements the Parallel execution,Selenium Grid distribute them across multiple machines
- > For more Selenium Interview Questions and answers, continue to the next post (Click on Next Post link below)
- > Check complete Selenium Interview Questions list here (Click here)
Please leave your questions/comments/feedback below.
Happy Learning 🙂