Installation of TestNG in Eclipse IDE

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.

TestNG_Tutorial_Installation_of_TestNG.png

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.

TestNG_Tutorial_Installation_of_TestNG_Marketplace.png

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.

TestNG_Tutorial_Installation_of_TestNG_Install_New_Software

Step 2: Enter http://beust.com/eclipse in Work with text field, and click on Add button.

TestNG_Tutorial_Installation_of_TestNG_Install_New_Software2.png

Step 3: Enter TestNG in the Name text field, and http://beust.com/eclipse in the Location field, and click OK.

TestNG_Tutorial_Installation_of_TestNG_Install_New_Software3

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.

TestNG_Tutorial_Installation_of_TestNG_Install_New_Software4.png

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.

TestNG_Tutorial_Installation_of_TestNG_Install_New_Software5.png

Step 6: Once after pressing the Finish button, the installation of TestNG will begin, and you will see installation wizard as below.

TestNG_Tutorial_Installation_of_TestNG_Install_New_Software6.png

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.

TestNG_Tutorial_Installation_of_TestNG_Install_New_Software7.png

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.

TestNG_Verify_Installation_of_Testng.png

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.

TestNG_Verify_Installation_of_Testng2.png

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!!

Cheers 🙂

 

 

 

 

Advertisements

#installation-of-testng, #installation-of-testng-through-eclipse-marketplace, #installation-of-testng-through-install-new-software, #verify-installation-of-testng