What is TestNG framework in Selenium?

What is TestNG framework in Selenium?

TestNG is the Testing framework that provide various feature to execute test by @Test and many other test annotation. TestNG provide the capability to execute test in various manner like execute in groups, in Parallel, In sequential etc. So Basically TestNG is the test execution framework and you can use TestNG for any kind of testing like functional, Unit,Regression, Database and Api testing.

By the combination of using TestNG and Selenium, We can do various task in functional testing. like in beforeclass or beforetest method we are adding the selenium code for open browser and in afterclass or aftertestmethod we are using selenium code for close the browser.