Power Your Software Testing with AI Agents and Cloud
The Native AI-Agentic Cloud Platform to Supercharge Quality Engineering. Test Intelligently and Ship Faster.
- TestMu AI (Formerly LambdaTest)
- /
- Blog
- /
- How To Install TestNG In Eclipse: Step-By-Step Guide
How To Install TestNG In Eclipse: Step-By-Step Guide
Learn how to install TestNG in Eclipse IDE and add it to your Java projects.
Last Updated on:
Test automation guarantees software competence without repetitive human intervention. TestNG, or Test Next Generation, is one of Java’s most frequently used automation testing frameworks, ranking 4th on the JetBrains developer survey.
Inspired by JUnit and NUnit, TestNG is a Java Test Automation Framework that allows users to perform different types of testing, such as Unit Testing, Integration Testing, Functional Testing, etc.
In this article, you will learn how to install TestNG in Eclipse and set it up in your system to start writing test scripts for your test project. If you are preparing for an interview you can learn more through TestNG interview questions.
Overview
To install TestNG in Eclipse, use the Eclipse Marketplace for a quick setup, or use the "Install New Software" option as an alternative if the plugin is not visible in the marketplace. Both methods integrate the Java testing framework directly into your IDE after a quick restart.
What Is TestNG Framework?
TestNG is a Java testing framework that simplifies writing and running automated tests, supporting unit, functional, integration, and end-to-end testing with annotations, parallel execution, and detailed reports.
How to Install TestNG in Eclipse IDE?
- Eclipse Marketplace: Install TestNG by searching for "TestNG" in the Eclipse Marketplace under the Help menu, confirming the checkboxes, accepting the license, and restarting the Eclipse IDE to complete the integration.
- Install New Software: Install TestNG by navigating to "Install New Software" under the Help menu, entering the update site URL (https://testng.org/testng-eclipse-update-site/), selecting the plugin, and restarting Eclipse after installation.
- Installation verification: Confirm TestNG is successfully installed by right-clicking any Java project in Eclipse and checking for TestNG options in the menu after restarting the IDE.
- Java project conversion: Integrate TestNG into an existing Java project by right-clicking the project, selecting "Convert to TestNG", and reviewing the generated testng.xml configuration file.
- Test execution: Run your automated tests by selecting "Run As TestNG Test" to execute test classes, generate detailed reports, and integrate your test suites with CI/CD pipelines.
What Is TestNG?
TestNG, created by Cédric Beust, is one of Java’s most popular test automation frameworks. The annotations, functionalities, usability, features, and ease of use provided by TestNG make it a prevalent choice of framework. Listed below are some of the benefits of using TestNG for Selenium automation testing:
- The reporting feature provides a detailed XML report of every successful, failed, or skipped test.
- Parallel testing assists testers in running multiple test cases with the added benefit of CI/CD integration.
- TestNG annotations feature allows developers to handle exceptions and understand the code easily.
- Test cases can be grouped or prioritized easily.
- Flexible runtime configuration.
How To Install TestNG In Eclipse
First, ensure you have Java installed on your system, as the TestNG framework is based on Java. Install Eclipse IDE from the official website if you haven’t already. We are now ready to install TestNG in Eclipse by following any of the given methods:
Installing TestNG from Eclipse Marketplace
Step 1: Open Eclipse IDE. Once it is launched, navigate to Help > Eclipse Marketplace.

Step 2: Search for TestNG in the search bar and click on install for the first result.

Step 3: Make sure that all the checkboxes for TestNG are checked, and then click on the Confirm button.

Step 4: Accept the license and click on Finish.

Note: For the TestNG plugin to work, Eclipse must be restarted. When you right-click on a project, you can find TestNG in the menu options if installed.

You can watch the Complete TestNG Framework Tutorial to understand the basics and get started with TestNG. With the help of this video, you can start writing unit tests for your project on Eclipse using TestNG.
You can also subscribe to the TestMu AI YouTube Channel and stay updated with the latest tutorials and updates on Selenium automation testing, Playwright automation testing, and more.
Install TestNG Using – Install New Software
In some versions of Eclipse, you might not find the TestNG plugin in the Eclipse marketplace. We can install TestNG in Eclipse from the TestNG plugin site in such cases.
Step 1: Go to Eclipse help and click on the “Install New Software” button.

Step 2: Enter the TestNG plugin link “https://testng.org/testng-eclipse-update-site/” in the search bar. It will fetch the required plugin. Ensure the check bar is selected, and click the next button to start the installation.

Step 3: Accept the license agreement and hit the Finish button. The installation status is visible in the bottom right corner. Provide permission wherever required. Once installation is complete, restart the IDE to notice changes.

Setting Up TestNG Eclipse Tests From Your Existing Java Projects
Once we have successfully installed TestNG on Eclipse, we can integrate it with existing Java projects to create tests by doing the following:
Step 1: Writing a test with TestNG on Eclipse is very simple. First, find the project you need from the explorer on the left and right-click on it.

Step 2: Select and click on Convert to TestNG. You will see a refactoring window popping up with the testng.xml details. Testng.xml is the configuration file that allows us to control the execution of tests, handle multiple test classes, define test suites, etc. Click on Finish. We can see the XML file created in the directory.


You can create a new test class from the dropdown and add annotations to define actions. Under the project, you can run the tests from the Run As option.

TestNG Certification from TestMu AI is also a great way to validate and refine your test automation testing skills. TestMu AI is an AI-Native test orchestration and execution platform that lets you run manual and automated tests at scale on over 3000 real devices, browsers, and OS combinations. Not only does it validate your expertise, but it also provides a recognized credential, boosting your credibility in the job market.
Austin Siewert
Co-Founder, Steadfast Systems
Discovered @TestMu AI yesterday. Best browser testing tool I've found for my use case. Great pricing model for the limited testing I do 👏
2M+ Devs and QAs rely on TestMu AI
Deliver immersive digital experiences with Next-Generation Mobile Apps and Cross Browser Testing Cloud
Conclusion
To conclude, we installed TestNG in Eclipse from the Eclipse Marketplace and via the Install New Software option. We also verified that TestNG has been installed successfully and is working. We then tried adding TestNG to our existing Java projects in Eclipse.
You can now learn to create and run your first TestNG automation script and try running automation testing on the Cloud.
Author
Kritika Murari is a Community Contributor with experience in creating technical content around software testing, automation, and emerging technologies. A former Content Manager at TestMu AI, she has authored blogs, guides, and resources that simplify complex testing concepts for developers and QA professionals. Kritika actively contributes to the testing community through insightful content and knowledge-sharing.
Frequently asked questions
Did you find this page helpful?
More Related Blogs
TestMu AI forEnterprise
Get access to solutions built on Enterprise
grade security, privacy, & compliance
- Advanced access controls
- Advanced data retention rules
- Advanced Local Testing
- Premium Support options
- Early access to beta features
- Private Slack Channel
- Unlimited Manual Accessibility DevTools Tests





