Introduction to TestNG

August 1, 2016

TestNG stands for Test Next Generation. It’s a testing framework specially designed for Unit Testing, It’s a tool inspired by JUnit. It can be used by developers to write unit tests or by testers to write automation test cases.

As compared to JUnit, TestNG has:

  • A wide range of easy to remember annotations.
  • A wide range of Assertions.
  • Sequencing (order of execution) is possible in TestNG
  • Parallel Testing capabilities.
  • Grouping of Test cases from different classes.
  • Parameterisation is possible in TestNG.
  • Report generation is better in TestNG.
  • Dependency Testing.

Comparison Between TestNG and JUnit:

Anotation Support

Exception Testing

Ignore Test

Timeout Test

Test Suite

Grouping Test

Parameterization

Dependency Test

JUnit

Yes

Yes

Yes

Yes

Yes

No

No

No

TestNG

Yes

Yes

Yes

Yes

Yes

Yes

Yes

Yes

TestNG is the most popular testing framework available in the market, it can be installed easily with IDE’s like eclipse.

In a testng classes, there is no need to have a main method, It can be directly executed.

It provides us with a detailed report in various formats like HTML, XML, and CSV.

In the next tutorial, we will learn Installation and Environment setup for TestNG.

For any questions, suggestions or queries feel free to write us at saurabh@qatechhub.com or support@qatechhub.com. Happy Learning

Installing TestNG

Saurabh

About the Author

Saurabh

Follow Saurabh:

Leave a Comment: