Issue
I am using TestNG framework for selenium webdriver scripts. I run them periodically using Jenkins in slave machines. I do not use Selenium Grid. What is the advantage of using selenium grid over jenkins in running the webdriver automated testcases? Please clarify if my understanding is completely wrong.
Solution
Well Selenium Grid helps you to run your tests in parallel on multiple different nodes (slave machines) which are to be registered to central hub. You create your driver object by sending the request to the hub which finds a matching node based on the desired capability you have set, and executes the test on that node.
While Jenkins is a continuous integration tool. It cannot distribute your test cases over multiple nodes. In fact jenkins is nothing specific to selenium, it is just a CI tool. It is a triggering point of your tests after your builds.
If you need to distribute your tests across machines I think you should use Selenium Grid simply because it will do the management of distribution and do a lot of work underneath.
However, since jenkins allows you to run multiple nodes you can use it to distribute your tests but then you have to management part where you distribute your tests and then get a consolidated report. Selenium plugins might be of some help in that respect.
Answered By - Shamik
Answer Checked By - Senaida (JavaFixing Volunteer)