How to Install TestNG in Eclipse

Install TestNG in Eclipse: TestNG in Eclipse IDE is straightforward because it comes as a plugin. There are some prerequisites for installing TestNG, such as an Internet connection, and Eclipse should be installed.

If your local machine Eclipse is not installed, you can follow our article, which mentions how to install Eclipse on your own. And For learning more about testNG you can check our TestNG Tutorials.

How to Install TestNG in Eclipse

There are 3 different ways to install TestNG on your Eclipse editor.  

  • Install from the Eclipse Marketplace
  • Install using Eclipse’s “Install New Software”
  • Install TestNG in Eclipse IDE via offline Jar files.

We will try to share the details step by step so you can learn how to add TestNG to your project or with Eclipse. You need to follow the steps to install it successfully.

Install from the Eclipse Marketplace

To Install TestNG with the help of Eclipse Marketplace, you can click on HELP from the menu and then you need to click on the Eclipse Marketplace.

Then Type TestNG On the Find Searchbox field and Click the Go button. Then you will get the TestNG plugin in the result section. Also, you can see the install button. To Install the plugin, click on the install button and follow the installation process.

Install using Eclipse’s “Install New Software”

  • Launch Your Eclipse Editor, which you have saved on your local machine.
  • After successfully Launch, go to the Help menu, and from there, choose “Install New Software” options and click on that. When you click on that, you will get an install popup.
  • You can find the Add button in the install dialogue – Click the “Add” button.
  • After clicking the add button, you will get another Add Repository dialogue, and There you will get two textboxes (Name, Location). In the Name Text box, enter the Name, which is TestNG, and in the location text box, you need to enter “” as the location, and after that, click OK.
  • You can find TestNG options When you return to the previous install dialogue. Select the checkbox that is present beside Testing, and after that, click the “Next” button. Once you click the next button, the plugin manager looks at the components and dependencies needed to install TestNG.
    It will give you an error or warning message if it finds any missing dependencies. Only after completing those can you install TestNG without any issues.
  • Choose the “I accept the terms of the license agreement” radio button, and after that, click the finish button to complete the installation process.
  • You may get some other dialogue windows that may encounter security warnings. So, in the dialogue blog, click OK.
  • After successful installation, you will get a prompt dialogue box that mentions restarting Eclipse.
  • Click Yes to restart the Eclipse.
  • After successfully installing it, you can verify whether the TestNG is appropriately installed by right-clicking on the project. See in the list if you are finding the TestNG option is displaying or not. If you can see the TestNG, it means TestNG was successfully installed on your machine.

Install TestNG in Eclipse IDE via offline Jar files

Suppose you are working in some restricted environment where automatic TestNG installation is not possible. In that case to install TestNG on your editor you can follow the below steps.

  • To install, you need to first download the TestNG jar files from this link.
  • This will download the Zip file of TestNG and then extract the zip file.
  • After extracting, you can see two folders of plugins and features.
  • Go to the Eclipse installation directory and search for the dropins folder.
  • Inside the dropins folder, you need to create a separate folder and name it testng.
  • Then copy the features and plugins folder of the extracted TestNG zip file into the testng folder.
  • Once the files are copied successfully, you can restart your Eclipse editor. After that, you can Verify whether the TestNG option is visible or not.

That’s all about how you can install TestNG on your local machine. After following the above steps, if you still face problems, let us know in the comment section, and we will try to help install TestNG on your local machine.

I love open-source technologies and am very passionate about software development. I like to share my knowledge with others, especially on technology that's why I have given all the examples as simple as possible to understand for beginners. All the code posted on my blog is developed, compiled, and tested in my development environment. If you find any mistakes or bugs, Please drop an email to, or You can join me on Linkedin.

1 thought on “How to Install TestNG in Eclipse”

  1. i have installed TestNG by following you are procedure, but am facing problem,
    i can’t see the option as”Run as TestNG”
    please can u figure it out.


Leave a Comment