In this chapter, we will discuss the various ways to install TestNG and then demonstrate hoow to install TestNG using Eclipse.
Let’s start with the compatible IDEs. IDE stands for Integrated Development Environment. The compatible IDEs are Eclipse, NetBeans, and IntelliJ. Next, we can setup TestNG using build tools Ant or Maven.
In addition to the IDEs and build tools, we can use the command line or download the TestNG jars. The focus in this chapter will be installing TestNG using Eclipse but I will provide a reference link for NetBeans, IntelliJ, Ant, and Maven.
First, I’ll show you to how install TestNG using Eclipse Marketplace.
Go to Help
Select Eclipse Marketplace
TestNG in the Find text box
Click the Go button
Click the Install button
Click the Confirm button after making sure all of the checkboxes are checked
Select "I accept the terms of the license agreement"
A security warning shows up to let you know you are installing software that contains unsigned content. This shows up because TestNG is 3rd Party plugin.
Click Install anyway
Click Restart Now to restart Eclipse
Another way to install TestNG is through "Install New Software".
TestNGfor Name and
After installing TestNG, we must add the TestNG Library.
We have the option of adding our TestNG Library now or waiting until we import an annotation. Let’s go ahead and add the TestNG Library now. There’s more than one way to add a TestNG Library but we are going to do so by configuring the build path.
We are finished installing TestNG and adding TestNG as a library.