In this blogpost, we will learn how to install TestNG in Eclipse IDE. There are mainly two ways to install TestNG in Eclipse, as listed below.
- Installing TestNG through Eclipse Marketplace
- Installing TestNG through Install New Software option
In case you do not have Eclipse in your system, visit the link, and get latest version of Eclipse.
Let us get started with the first option to get TestNG in Eclipse IDE.
Installing TestNG through Eclipse Marketplace:
Step 1: Once you have Eclipse installed in your system, open the Eclipse IDE, go to Help menu, and click on Eclipse Marketplace menu item.
Step 2: Type TestNG in search bar, beside Find label, and hit Enter. You will get TestNG plugin in result, click on Install button to install the plugin in Eclipse IDE.
Step 3: Once the installation is completed, search for TestNG one more time, and you will be able to see Installed button in place of Install.
Installing TestNG through Install New Software feature:
Step 1: Once you have Eclipse installed in your system, open the Eclipse IDE, go to Help menu, and click on Install New Software.. menu item. It will open Install dialog box.
Step 2: Enter http://beust.com/eclipse in Work with text field, and click on Add button.
Step 3: Enter TestNG in the Name text field, and http://beust.com/eclipse in the Location field, and click OK.
Step 4: After clicking the OK button, Eclipse will list down available versions of TestNG plugin as below. Click on the checkbox just beside TestNG, and you will see two TestNG plugins listed. Select both the plugins, and click Next button.
Step 5: After clicking the Next button, you will be redirected to Review Licence dialog box, select I accept the terms of the licence agreements radio button, and click the Finish button.
Step 6: Once after pressing the Finish button, the installation of TestNG will begin, and you will see installation wizard as below.
Step 7: Once after the installation is completed, you will be asked to restart Eclipse for the changes to take effect. Click on Yes button, once the Eclipse is restarted, you will be able to see TestNG installed in Eclipse IDE.
Verify installation of TestNG plugin in Eclipse IDE:
In order to verify whether TestNG plugin is installed in Eclipse IDE properly or not, open Eclipse and go to File -> New -> Other.
After clicking the Other menu item, a select wizard will be prompted on the screen. Try to Scroll down, and you will be able to see TestNG folder as shown in the image below.
If the TestNG folder is visible in the wizard, TestNG plugin is installed successfully in Eclipse IDE, and you can get started with your first TestNG test.
That is all from this blogpost, hope it helps you!!