Monday 19 January 2015

Introduction to TestNG Test Automation Framework

Introduction to TestNG

TestNG is a testing framework used for Automation Testing in selenium. TestNG is a framework that overcomes the limitations of JUnit. The "NG" means "Next Generation".  It is more easier to use and generates better reports than Junit.

Official Website for TestNG

http://testng.org/doc/index.html

Features of  TestNG


1) Use more Java and OO features
2) Feature-rich (JUnit: simplicity is valued)
3) Support testing integrated classes (e.g., by default, don’t create a new test class instance for every test method).
4) Separate compile-time test code from run-time configuration/data info.

Common Problems with Junit

• Very difficult to write parameterized test cases
• Difficult to debug
• Junit is a unit testing framework
• Fail and rerun is difficult, we have re-run the entire suite.

Advantages of TestNG over Junit

• Annotations are easier to understand
• Test cases can be grouped more easily
• Parallel testing is possible
• Support for data-driven testing (with @DataProvider).

No comments:

Post a Comment