TestNG Eclipse Plugin
- Open Eclipse and go to Help | Eclipse Marketplace. Then search for “TestNG”. You should get following result.
- In the next screen, accept the license agreement and click on Finish button.
- After installation is finished, Eclipse will ask you to restart so that TestNG Eclipse plugin is available to use. Click on “Restart Now” to restart Eclipse and start using the TestNG plugin.
TestNG for Eclipse Installation Verification
After Eclipse is restarted, go to New | Other. The wizard window will open up and you should see option to create a TestNG class.
If you get above option, then it means that TestNG Eclipse plugin has been installed successfully.
TestNG Eclipse Tutorial
You can go through TestNG Tutorial to learn how to create TestNG tests using TestNG for Eclipse plugin.
TestNG Eclipse Run Configuration
We can create TestNG classes run configuration so that we don’t have to find the test class and run it as TestNG test.
Let’s see how easily we can create an Eclipse TestNG Run Configuration.
Open the TestNG test class and go to Run As | Run Configurations.
In the configuration screen, provide a descriptive name for the configuration. Browse for the project and select the class as shown in the below image.
Click on “Apply” button to save the configuration. You can then click on “Run” button to run the configuration, which will run the TestNG test class.
You can go to Run | Run Configurations and select the predefined configuration to run the TestNG test class.
That’s all for a quick tutorial on using Eclipse TestNG plugin.