Install TestNg in Eclipse

In this post I will be installing Testng plugin in eclipse.


Open eclipse
Go to help -> Eclipse Marketplace

Search for Testng
Click Install for "TestNg for Eclipse"

To check if Testng has been installed sucessfully create new java project.
Add New Java File. And paste the code.


 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
import org.testng.annotations.Test;

public class A {

 @Test
 public void t1()
 {
  System.out.println("Test 1");
 }
 
}

In the quick Fix dialog add Testng library.
Now Right click java file then Run as -> Test Ng test

Now the Test should Execute Successfully.

Video Tutorial :


Comments