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