TestNG Tutorial #1 – How to Install TestNG in Eclipse IDE

In this TestNG tutorial we will learn How to Install TestNG in Eclipse IDE.

There are many ways in which you can setup TestNG in Eclipse IDE and we will cover all the ways on installation and setup of TestNG in eclipse IDE for Selenium Webdriver Automation.

TestNG Tutorial #2 – How to Write Test Cases Using TestNG

In this TestNG tutorial we will learn How to Write Test Cases Using TestNG.

In Selenium WebDriver TestNG Automation, it is very important to identify your test cases. TestNG provides @Test annotation which is used to define any test case in TestNG. Watch the full tutorial series to learn complete TestNG for Selenium Automation.

TestNG Tutorial #3 – TestNG Annotations | BeforeMethod vs BeforeTest

In this TestNG tutorial we will learn about TestNG Annotations, BeforeMethod vs BeforeTest and AfterMethod vs AfterTest.

We will understand with example how to use TestNG annotations @BeforeTest, @AfterTest, @BeforeMethod @AfterMethod in your test scripts.

✅ @BeforeTest: The method annotated with @BeforeTest annotation will be executed before any test method belonging to the classes inside the “test” tag is run.

✅ @AfterTest: The method annotated with @AfterTest annotation will be executed after all the test methods belonging to the classes inside the “test” tag have run.

✅ @BeforeMethod: The method annotated with @BeforeMethod annotation will be executed before each test method.

✅ @AfterMethod: The method annotated with @AfterMethod annotation will be executed after each test method.

TestNG Tutorial #4 – How to Use Assertion in Selenium TestNG

In this TestNG tutorial we will learn how to use Assertion in Selenium TestNG.

TestNG library provides the Class Assert which has methods that are used to perform assertions in Selenium TestNG.

TestNG Tutorial #5-Soft Assertion in TestNG | SoftAssert vs HardAssert

In this TestNG Tutorial we will learn about soft assertion in TestNG and how to perform soft assert. Soft assertion is important in selenium webdriver automation scenarios where you want to execute your script further even after failed assertions in your test script.

We will also understand the difference between soft assert vs hard assert.