How to install TestNG plug-in for Eclipse?


TestNG is an open−source automation testing framework. It can be used along with build tool such as maven, Gradle, ant and even with snapshot. However, user can separately download the TestNG jar file and configure it with the project without using build tool.

In this article, we will see how to install TestNG plugin for Eclipse.

Download latest TestNG jar

Following steps should be followed to download the latest/specific version of TestNG jar.

  • Open the browser and navigate to https://testng.org.

  • Once page opens, click on Download present at top.

Following screenshot displays testing.org page and download button.

  • It displays Current release Version along with how to use in build tools − maven, Gradle and Snapshot.

Following screenshot displays how to search TestNG in maven repository:

  • Now click on TestNG. It displays all available version to download.

  • Click on latest version or any specific version to download as shown in below screenshot:

  • Now, click on Jar as shown in below screenshot to download the TestNg jar file.

  • Once user clicks on it, it starts downloading and ready to configure.

Install plugin in Eclipse

Following steps should be followed to install TestNG plugin in Eclipse.

  • After downloading the file, set the class path in Eclipse.

  • Open Eclipse → Right click on the Project Name and go to Property → Build Path → Configure Build Path.

  • Make sure user is at Java Build Path section and click on Libraries.

  • Add the testng−7.4.jar in the libraries using Add External Jar button.

  • Click on Apply and close.

  • We assume that your Eclipse has inbuilt TestNG plug−in; if it is not available, then please get the latest version using the update site.

  • In the Eclipse IDE, select Help / Eclipse Marketplace.

  • Search for TestNG. You will get the TestNG in the list. Click on Install as shown below.

  • After installation, Install button will be replaced as Installed and it will be disabled.

Updated on: 17-Aug-2023

69 Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements