
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Difference Between Selenium WebDriver and TestNG
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.
WebDriver | TestNG |
---|---|
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. |