TestNG Tutorial #11 – DataProvider in TestNG | Data Driven Testing

In this TestNG tutorial we will learn about DataProvider in TestNG and how to user TestNG dataprovider to perform data driven testing in Selenium WebDriver.

TestNG library provides @DataProvider annotation which is used to mark a method as supplying data for a test method. Watch the full series to learn complete TestNG test framework.

TestNG Tutorial #10 – TestNG Annotations | BeforeSuite and AfterSuite

In this TestNG tutorial we will learn about TestNG Annotations, BeforeSuite and AfterSuite.

We will understand with example how to use TestNG annotations @BeforeSuite and @AfterSuite in your test scripts.

✅ @BeforeSuite: The method annotated with @BeforeSuite annotation will be run before all tests in this suite have run.

✅ @AfterSuite: The method annotated with @AfterSuite annotation will be run after all tests in this suite have run.

TestNG Tutorial #9 – TestNG Annotations | BeforeGroups | BeforeClass

In this TestNG tutorial we will learn about TestNG Annotations, BeforeGroups, BeforeClass, AfterGroups and AfterClass.

We will understand with example how to use TestNG annotations @BeforeGroups, @AfterGroups @BeforeClass and @AfterClass in your test scripts.

✅ @BeforeClass: The method annotated with @BeforeClass will be executed before the first test method in the current class is invoked.

✅ @AfterClass: The method annotated with @AfterClass will be executed after all the test methods in the current class have been run.

✅ @BeforeGroups: The method annotated with @BeforeGroups is guaranteed to run shortly before the first test method that belongs to any of the groups configured in this method.

✅ @AfterGroups: The method annotated with @AfterGroups is guaranteed to run shortly after the last test method that belongs to any of thee groups configured in this method.

TestNG Tutorial #8 – How to Skip Test Cases in TestNG

In this TestNG tutorial we will learn how to skip test cases in TestNG. Skipping testng tests is required many times based on different situations in your automation test suites, for example, test case is not completed or test didn’t meet certain conditions while execution.

We will understand different situations where skipping testng tests might be very helpful in your selenium webdriver automation.

TestNG Tutorial #7 – How to Create Test Suite in TestNG

In this TestNG tutorial we will learn how to create test suite in TestNG testing framework.

TestNG testing framework provides TestNG.xml file which is utilized to categorize your test cases into different categories or Test Suites like regression, functional, Smoke, BVT etc.