To include TestNG to your build path, first, you have to install TestNG plugin in the Eclipse. Below steps will explain how to install TestNG plugin.
- Launch the Eclipse IDE and from the Help menu, click âInstall New Softwareâ.
- You will see a dialog window, click âAddâ button.
- Type name as you wish lets take âTestNGâ and type âhttp://beust.com/eclipse/â as location. Click OK.
- Click âI accept the terms of the license agreementâ then click Finish.
- You may or may not encounter a Security warning if in case you do just click OK.
- Click Next again on the succeeding dialog box until it prompts you to Restart the Eclipse.
- You are all done now, just Click Yes.
Now Add TestNG library to your Project.
- Right-click on the Project and select Properties
- Select "Java Build Path" and Select "Libraries" tab
- Click "Add Library..."
- Select "TestNG" and click Next
- Click Finish.
- Then Click OK.
That's all. TestNG is added to your build path.