TestNG Tutorials – Integration with Selenium

TestNG stands for Test Next Generation. It is a testing framework used by developers for Unit Testing and by Automation Testers for writing functional test cases. TestNG tutorials here starts with Beginner’s Level and also covers all advanced topics. For a better understanding of the subject, We will recommend you to go through these items in sequential order and practice them thoroughly.

TestNG Tutorials

TestNG Tutorials for Beginners:

Introduction to TestNG and Comparision with JUnit

Let us first understand What is a TestNG? Why we need a testing framework? and lets compare testng with one another good tool called JUnit.

Installing TestNG in Eclipse.

TestNG is an open source testing framework but it does not come inbuilt with IDEs like Eclipse. This topic here covers “How to Install TestNG with Eclipse IDE?”

Annotations and attributes in TestNG.

Let us learn the wide range of annotation and attributes which TestNG provides like @Test, @BeforeMethod, @AfterMethod, etc. These annotations can control the order of execution of various methods.

Assigning Priority to Test cases

The default order of execution of test cases in TestNG is alphabetic order; this tutorial covers “How to execute test cases in desired order?”

Enabling or Disabling a test case in TestNG

This scenario covers How to enable or disable a test case in TestNG?

Assertions in TestNG.

Good Assertions is a key for achieving good and reliable automation results. Its very important to have atleast one assertion each test case.

Advanced Level topics in TestNG

Introduction to testng.xml.

Another benefit which TestNG provides us is running test cases from testng.xml file, which gives us the capability to run test cases in parallel, allows grouping of test cases and much more.

Executing all test cases of all the classes of a package through testng.xml

Here, we will learn “How to run all the test cases of the different file from a package?”

Executing test cases from multiple classes using testng.xml

Using TestNG test cases from multiple classes can be executed in a go.

Grouping test cases in TestNG.

This section of TestNG tutorials covers execution of test cases in Groups, say, for example; you want to execute the Sanity test cases or Regression test cases, etc.

Parameterization in TestNG using testng.xml.

This tutorial covers how to execute a test case with some parameters

Data Providers in TestNG.

To execute a single scenario with multiple test data Data Provider is used in TestNG.

Parallel Execution on Multiple Browsers using TestNG.

To execute a set of test cases on multiple browsers parallelly.

This is not the end of the tutorials; We will keep on adding the tutorials, keep checking this place for or Join Our Newsletter and get all latest updated tutorials, Interview Questions, Assignments and much more in you mailbox.

PS: For any queries, questions, suggestions or feedback feel free to write us at saurabh@qatechhub.com or support@qatechhub.com.