How to Do Parallel Test Execution In Selenium TestNG Example Program?

Parallel Test Execution TestNg Program: How to Do Parallel Test Execution In Selenium TestNG Example Program?

package com.selenium.TestNG;
import org.testng.annotations.Test;
public class ParallelTestExec 
{
   @Test
   public void test1()
   {
      System.out.println("Test1 Executed");
      System.out.println("Test Case One with Thread Id:- "+ Thread.currentThread().getId());
   }
   @Test
   public void test2()
   {
      System.out.println("Test2 Executed");
      System.out.println("Test Case Two with Thread Id:- "+ Thread.currentThread().getId());
   }
}

I love open-source technologies and am very passionate about software development. I like to share my knowledge with others, especially on technology that's why I have given all the examples as simple as possible to understand for beginners. All the code posted on my blog is developed, compiled, and tested in my development environment. If you find any mistakes or bugs, Please drop an email to softwaretestingo.com@gmail.com, or You can join me on Linkedin.

Leave a Comment