Submitted by harrydev on Sun, 11/02/2014 - 12:39
In testing, it is always important to test application in different browsers. We can perform automation on multiple browsers using selenium and testng. If there are more number of tests that need to be executed in parallel on different browsers also, we can do this using testng. And there is an other challenging task such executing tests in different browser versions and also different Operating systems. This can be achieved with Selenium Grid.
Submitted by harrydev on Sun, 10/26/2014 - 03:59
TestNG provides an ability to run test classes in parallel. By using parallel execution of classes, each class will be started and executed simultaneously in different threads.
Let us look at basic example for Parallel Execution of Classes using testng.xml.
We will create a Two classes with Two test methods each and try to execute in different threads.
Create class and name it as : TestParallelClassOne.java
Submitted by harrydev on Sun, 10/26/2014 - 03:53
TestNG provides multiple ways to execute tests in separate threads. In testng.xml, if we set 'parallel' attribute on the tag to 'tests', testNG will run all the ‘@Test’ methods in tag in the same thread, but each tag will be in a separate thread.
If we want to run methods/classes in separate threads, we need to set 'parallel' attribute on the tag to 'methods' / 'classes'