- Create a new Test Plan in JMeter.
- Add a Thread group.
- Make sure the Selenium related plugins are install in the JMeter tool, else get them added with the help of the “Plugin Manager” (found under “Options”).
- Right Click on the Thread Group Goto Controller -> Add Simple Controller
- Go to Config Element -> Add Remote WebDriver Config to the Simple Controller.
- Go to Sampler -> Add WebDriver Sampler to the Simple Controller under Remote WebDriver Config
- Once the the WebDriver Sampler is added write the Selenium code in the Sampler to run your automated tests. Add an assertion, and the Listeners like Summary Report and other Listeners.
- Make sure you set up the hub in your machine and connect them to the nodes, and add the node machine IP Address in the Selenium Grid URL space in Remote Webdriver Config, As shown below.
Eg:- http://<IP_ADDRESS>:<NODE PORT>/wd/hub
- Now you can run the tests on the node machines.