O'Reilly logo

TestNg Beginner's Guide by Varun Menon

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

TestNG

TestNG, where NG stands for "next generation" is a test automation framework inspired by JUnit (in Java) and NUnit (in C#). It can be used for unit, functional, integration, and end-to-end testing. TestNG has gained a lot of popularity within a short time and is one of the most widely used testing frameworks among Java developers. It mainly uses Java annotations to configure and write test methods.

TestNG was developed by Cedric Beust. He developed it to overcome a deficiency in JUnit. A few of the features that TestNG has over JUnit 4 are:

  • Extra Before and After annotations such as Before/After Suite and Before/After Group
  • Dependency test
  • Grouping of test methods
  • Multithreaded execution
  • In-built reporting framework

So, let's get familiarized ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required