TestNG Tutorials

TestNG is a testing framework written by Java and inspired from JUnit and NUnit, it is not only inherited existing functionality from Junit as well as introducing some new innovative functionality that make it powerful, easy to use, reliable, maintainable and testable codes. TestNG is designed to cover all categories of tests: unit, functional, end-to-end, integration, etc. we can take full advantage of TestNG from engineering to quality insurance.

The TestNG project aims to help developers take the next step—the NG stands for “next generation” — enabling broader and deeper test coverage that encompasses not only unit tests but also acceptance, functional, and integration tests.

What’s TestNG features?

  • Annotations. (JDK 5 new features, if unfamiliar with annotations, you should familer with it.)
  • Test that your code is multithread safe.
  • Using XML do Flexible test configuration.
  • Support for data-driven testing (with @DataProvider).
  • Powerful execution model (no more TestSuite).
  • Dependent methods for application server testing.
  • Supported ignore, time, parameters, Suite and exception Test.
  • Supported by Eclipse, IDEA, Ant, Maven, Netbean, Hudson and so on.
  • Test that your source code is multithread-safe.
  • Never superfluous code, No required extend specified class.
  • Easy to migrate from JUnit

Get ready to learn? – Working TesNG case in Eclipse

TestNG tutorials and examples

Generate code Coverage with TestNG

Оцените статью
Добавить комментарий

Your email address will not be published. Required fields are marked *



  1. safe testing

    Thank you for sharing your info. I truly
    appreciate your efforts and I am waiting for your
    further post thanks once again.

  2. Prakash

    Can u tell how to get the subsuit tests into single test????

    1. admin автор

      Can you please tell more a little bit specific, like an example.

  3. Ashish Singh

    My testing.xml contains 3 tests as below:

    I need to run only CheckODARurl method without commenting others using the command line. I am using below command line but it is executing all the 3 tests. Can any one let me know what I am doing wrong here :

    C:\Users\asin152\Documents\Java 2014\Projects\Smoke_ODAR>java org.testng.TestNG \bin\config\testing.xml -methods scripts.TestNgLogin.CheckODARurl