Wednesday, July 22, 2020

What is TestNG? and How to Install TestNG in Eclipse (Java)?

What is TestNG?


  • TestNG is Java Testing Framework that is inspired by JUnit and NUnit.
  • It overcomes the limitation of and drawback of JUnit.TestNG introduce a new set of features that makes TestNG more powerful and user friendly
  • TestNG stands for Test Next Generation.
  • It is used for Simple Unit Testing and Complex Integration Testing.
  • Using of TestNg it makes simple for Functional, Regression and End to End Testing.

Why TestNG is Used?

Selenium tests can not generate proper format for test results but using  TesNg generates the test results. For Example, when Automation Test Engineer works with 1000  Test cases he needs to understand how many test cases fail, passed, skip and he needs to show the reports to his TL.So it's difficult to manually generate reports.TestNG provide the facility to generate reports and Execute multiple test cases in the group.

How to Install Testng in Java (Eclipse)?

Before works with TESTNG, need to require to install Java, Eclipse on the machine if it is already not installed on the machine. To add testing in Eclipse, follow below steps:
1.Open Eclipse.

2. Go to Help->Eclipse Marketplace.

3. Search for "TESTNG" in the search text box and click on "Install" Button to install TestNG.
4.  If it is installed it shows in the above image as installed and for the check, it is installed or not click on Windows->Preferences. In that display Testng when it is installed successfully.

"Eclipse MarketPlace" not display in Help Menu?

Some of the Eclipse not display Help->Eclipse marketplace Menu so for that Follow Below steps:


1. Go to Help > Install New Software


2. Paste the Marketplace Client update site url into the “Work with” field: http://download.eclipse.org/mpc/photon



3. Select the “EPP Marketplace Client” checkbox.

4. Follow the wizard and restart your Eclipse to finish the installation and Check the menu in the Help option.