Saturday, December 31, 2011

Getting started with TestNG

        TestNG ("Testing, the Next Generation") is a Java unit testing framework that aims to overcome many limitations of JUnit. TestNG introduces some new functionalities that make it more powerful and easier to use, such as:
  • JDK 5 Annotations (JDK 1.4 is also supported with JavaDoc annotations)
  • Flexible test configuration
  • Support for data-driven testing (with @DataProvider)
  • Support for parameters
  • Powerful execution model (no more TestSuite)
  • Supported by a variety of tools and plug-ins (Eclipse, IDEA, Maven, etc...)
Pre-Requirement:
  • TestNG requires JDK 5 or higher.
TestNG Download and installation:
  • You can download the current release version of TestNG at  http://testng.org/doc/download.html , Unpacking the zip distribution to get TestNG decompression file, which includes the Testng-x.x.x.jar(x.x.x represents the version of testng jar)
  • Add to your project directly, you may also not be able to successfully build your codes with this jar because TestNG official decided the release did not include all external jar files in order to keep the size down.So follow the instructions given in the site and configure your IDE.
Note:As a beginner I highly recommend You start TestNG from 'example codes'(comes inside the downloaded zip) and docs(it is best materials to learn TestNG).


No comments:

Post a Comment