Site Loader
Auckland, New Zealand
In the last post we discussed how selenium grid works and how to configure selenium grid in greater detail. In this post we will move further and try to run multiple tests in parallel in different environments like
  • Different Operating systems
  • Different browsers

Distributed architecture

The distributed architecture we will work will look something like this

Parallel execution

Parallel execution of test can be achieved using testing framework TestNG In TestNG there is an option called Parallel which you can see from here

Here is the complete video of the above discussion Here is the complete code from the above video

Parallel Execution Test Code

public class ParallelTest {

	// RemotewebDriver instance
	public static RemoteWebDriver driver;

	@Parameters({ "platform", "browserName", "remoteurl" })
	public void beforeTest(String platform, String browserName, String remoteurl)
			throws MalformedURLException {

		DesiredCapabilities cap = null;

		if (browserName.equals("firefox")) {
			cap = new DesiredCapabilities().firefox();
		} else if (browserName.equals("chrome")) {
			cap = new DesiredCapabilities().chrome();


		driver = new RemoteWebDriver(new URL(remoteurl), cap);



	public void GoogleSearch() throws InterruptedException {

		driver.findElementByName("q").sendKeys("execute automation");



	public void ClickExecuteAutomation() {
		driver.findElementByPartialLinkText("Execute Automation").click();


Thanks for reading the post and watching the video !!! Please leave your comments and let me know if there is anything I should update in this post. Thanks, Karthik KK

Post Author: Karthik kk

5 Replies to “Selenium Grid Parallel test execution”

  1. Hi Karthik,

    Topic is Selenium Grid Parallel test execution and the video is of Hidden control.

    Could you please upload the video of Selenium Grid Parallel.


  2. Hi Karthik,

    I am using docker for selenium grid. Parallel execution is working fine but extent report is not able to capture all test cases. It captures only last test case. Could you please advise is there a feasible solution to capture all test cases in extent report ?

Leave a Reply

Your email address will not be published. Required fields are marked *