How to Install TestNG step by step

We will follow the below steps to install TestNG in Eclipse IDE .

There are two ways in installing TestNG in Eclipse

First Way on installing Eclipse is using "Install new software" option.

Second way is using "Eclipse Market Place". - This option will be available in new versions of eclipse.

NOTE: If your using eclipse latest version, please use Eclipse Marketplace option which is very simple, explained at the bottom.

Steps to Install Eclipse using Install new Software:

Step 1:
In Eclipse, on top menu bar, Under Help Menu, Click on "Install new Software" in help window.

Install New Software

Step 2:
Enter the URL (http://beust.com/eclipse/) at Work With field and click on "Add" button.

TestNg URL

Step 3:
Once you click on "Add", it will display the screen, Enter the Name as "TestNG".

Add Respository

Step 4:
After clicking on "OK", it will scan and display the software available with the URL which you have mentioned.

Now select the checkbox at TestNG and Click on "Next" button.
Install TestNG

Step 5:
It will check for the requirement and dependencies before starting the installation.

If there is any problem with the requirements/dependencies, it will ask you to install them first before continuing with TestNG. Most of the cases it will successfully get installed nothing to worry about it.

TestNG Dependencies

Step 6:
Once the above step is done, it will ask you to review the installation details. If your are ready or Ok to install TestNG, click on "Next" to continue.

TestNg review installation

Step 7:
Accept the Terms of the license agreement and Click on "Finish" button.

TestNg Accept

Thats it... It will take few minutes to get installed.

Finally once the installation is done, you can if the TestNG is installed properly or Not.

Go to Windows Menu bar, and Mouse Over on "Show View" and Click on "Other" at the last as in the below screen shot.

TestNg check

Expand Java folder and see if the TestNg is available as in the below screen shot.

TestNg Java

UPDATE:

Now eclipse is coming with Marketplace plugin by default which is a rich client solution for installing solutions listed on Eclipse Marketplace directly from an Eclipse. We can easily find third-party plugins that users can add to their Eclipse installation by using search option.

Under help menu, we should have an option as 'Eclipse Marketplace..'. Click on it.

Eclipse Market Place TestNG

Enter text as 'TestNG' and click on GO to search. You will now see TestNG with install option (If TestNG is already installed, you will have 'Update' and 'Uninstall'. as in the below screen shot)
Eclipse Market Place Install TestNG

Hope this tutorial helps you in installing in your machine. Happy Installing TestNG

Test Frameworks: 

Comments

Hi, While I tried to install TestNG (through both way) am getting an error mentioned below. Please help me to sort out this.

An error occurred while installing the items
session context was:(profile=D__setups_eclipse, phase=org.eclipse.equinox.internal.p2.engine.phases.Install, operand=null --> [R]org.testng.eclipse 6.9.12.201607091356, action=org.eclipse.equinox.internal.p2.touchpoint.eclipse.actions.InstallBundleAction).
org/eclipse/equinox/internal/simpleconfigurator/utils/SimpleConfiguratorUtils
org/eclipse/equinox/internal/simpleconfigurator/utils/SimpleConfiguratorUtils

I am not able to run the test cases in my eclipse IDE. I am getting the below messages when I run one or more test cases. Can anybody tell me the solution ?

[RemoteTestNG] detected TestNG version 6.8.9
[RemoteTestNG] Invoked with -serport 57601 -protocol json -d F:\encoreworks\maininterface\test-output C:\Users\Admin\AppData\Local\Temp\testng-eclipse--1595370957\testng-customsuite.xml
[BaseMessageSender] Waiting for Eclipse client on localhost:57601
[BaseMessageSender] Received a connection from Eclipse on localhost:57601
[BaseMessageSender] Connection established, starting reader thread
[BaseMessageSender] ReaderThread waiting for an admin message
[JsonMessageSender] Sending message [GenericMessage suiteCount:1 testCount:1]
[BaseMessageSender] ReaderThread received admin message:>ACK
[BaseMessageSender] Received ACK:>ACK
[BaseMessageSender] Received ACK:>ACK
[TestNG] Running:
C:\Users\Admin\AppData\Local\Temp\testng-eclipse--1595370957\testng-customsuite.xml

[JsonMessageSender] Sending message [SuiteMessage suite:Default suite starting methodCount:0]
[JsonMessageSender] Sending message [TestMessage suite:Default suite testName:Default test passed:0 failed:0]
[BaseMessageSender] Received ACK:>ACK
[BaseMessageSender] Received ACK:>ACK

Very helpful

Awesome! Its actually awesome article, I have got much clear idea about from this
paragraph.

Yaah ...Its great

Thanks!! Great help.. The Screenshots and highlights made it super quick

Post is very clear and helpful. Thanks much

Great....It is really helpfull post.

'Installing Software' has encountered a problem.
An error occured while collecting items to be installed.

An error occurred while collecting items to be installed
session context was:(profile=epp.package.jee,
phase=org.eclipse.equinox.internal.p2.engine.phases.Collect, operand=,
action=).
No repository found containing: osgi.bundle,org.testng.eclipse,
6.0.1.20110417_1101

Thank you...

Add new comment

CAPTCHA
This question is for testing whether or not you are a human visitor and to prevent automated spam submissions.