Transcripted Summary

In this chapter, we will discuss what is a test framework and what separates TestNG from other frameworks

A test framework is a pattern for writing and running test scripts. The purpose is to monitor testing and development of an Application Under Test (AUT).

A test framework is different from an automation design framework. Some of the most popular automation design frameworks are data-driven, keyword-driven, and hybrid-driven frameworks. With Selenium, we utilize a test framework to create our automation design framework.

Test frameworks simplify the process of testing by giving power to developers and automation engineers to write a quick test. We can add an annotation and assert statement then start our test. We also have the ability to run our tests as a collection in a test suite.

Some of the core functions within a test framework include:

  • creating and executing test scripts
  • generating test reports
  • generating logs
  • reading and writing test data

xUnit is a name for a compilation of Unit Testing Frameworks. Some of those frameworks are JUnit, PyUnit, and NUnit. JUnit is for Java, PyUnit is for Python, and NUnit is for the .Net programming languages such as C#. The xUnit family became popular after releasing JUnit. Later, many programming languages embraced the common architecture and joined the xUnit family.

However, as their family name implies, xUnit is a unit testing framework. These framewoorks can test units of an application at a time, where units are the smallest part of an application.

So, what separates TestNG from other frameworks? TestNG is able to test more than a unit. Just like the xUnit family, TestNG can perform the same functions because it was influenced by JUnit, however, TestNG has more testing features which support parallel testing, integration testing, dependency testing, data-driven testin, cross-browser testing, and end-to-end testing.

While the xUnit family is good, TestNG has been a step ahead when it comes to testing. However TestNG has also influenced the lastest versions of JUnit and has included a lot of the same concepts.

© 2024 Applitools. All rights reserved. Terms and Conditions Privacy Policy GDPR