Introduction

Introduction about TestNG

TestNG is a testing framework just like JUnit and NUnit but with more features and easily extensible. Unlike JUnit and NUnit which are mainly used by developers for their unit tests, TestNG can be used in unit testing, integration testing end to end testing. And mainly it addresses all the drawbacks that are present in JUnit (Listeners, Dependency Injection, etc.,).

Some of the main features of TestNG

  1. Annotation Based.

  2. Support of native dependency injection.

  3. Support for integration with multiple dependency injection frameworks like Guice (by default), Spring etc.,

  4. Easy to log and report using Listeners.

  5. Better control over test execution with the use of groups, dependencies, suites etc.,

  6. Easy to adopt data driven testing with use of DataProvider .

  7. Excellent handle for parallel execution.

We'll talk about each of these features in detail.

Last updated