Parallel Test Scripts execution is a process where multiple test scripts can be executed at same time. For creating this process we will use TestNG with the help of XML file on this post.
Step 1 >> Read Post “Create Project In Eclipse With TestNG” (http://qatestingtips.com/create-project-in-eclipse-with-testng-class/ ).
Step 2 >> After creating a script need to create one or more test script with same process to run parallel with the help of TestNG framework.
So now, create one more test script with same process and once one or more TestNG class will be created then will look like below screen.
Step 3 >> Right click on package >> new >> other
Step 4 >> Select XML file and click on next
Step 5 >> Give file name and click next
Step 6 >> See below option should be selected then click next
Step 7 >> See below screen to know option what should be selected and click finish.
Step 8 >> Then below screen will be generated and xml file will be created under project.
Step 9 >> Now create xml code to run both classes parallel.
<suite name = “testng” parallel = “classes” thread-count = “2”>
<test name = “testngtest”>
<class name = “testngpack.TestngClass1″/> //Give name of package.name of class
<class name = “testngpack.TestngClass2″/> //Give name of package.name of class
See My Screen like below:
Now it is time to run TestNG suite, so go to run and run it with TestNG Suite then both classes will be executed at same time.
Note: If any error then please see proper process.