What is the difference between selenium WebDriver and TestNG?

SeleniumAutomation TestingTesting Tools

WebDriver is a web automation framework which allows us to execute test across various browsers. It also allows us to create the test scripts in any programming language we want. WebDriver makes direct calls to the browser using each browser’s native support for automation.

TestNG stands for Test Next Generation. It is an automation testing framework and uses annotations. Annotations are lines of code that control how the method below it will execute. The greatest advantage of TestNG is that we can generate test reports and know the number of scripts passed, failed or skipped. Failed test cases can be run separately using TestNG. Along with it TestNG provides enables us with the ability to execute the test cases by reading the input file from any medium like excel and generate reports in a different mediums.

WebDriverTestNG
WebDriver is a web automation framework that uses Junit.It is an automation testing framework and uses annotations such as @BeforeTest, @AfterTest which makes it more comprehensible.
WebDriver does not have a native mechanism for generating reports.Test Reports can be generated using TestNG
For running the failed test cases we need to run the whole script again.Failed test cases can be run separately using TestNG.
raja
Published on 29-Jul-2019 10:56:24
Advertisements