- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
What is the 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. |
- Related Articles
- What is the difference between Selenium RC and Webdriver?
- What is the difference between Selenium's Remote Control vs WebDriver?
- Difference between selenium IDE, RC & WebDriver.
- What is the difference between selenium and automation?
- What is the difference between mocha and Selenium?
- What is difference between selenium 1 and Selenium 2
- What is difference between selenium 2 and selenium 3?
- What's the relationship between Selenium RC and WebDriver?
- Difference between JUnit and TestNG
- What is WebDriver in Selenium?
- What is the difference between getWindowHandle() and getWindowHandles() in Selenium?
- What is difference between Assert and Verify in Selenium?
- Is TestNG part of selenium?
- What is the difference between relative and absolute XPath in Selenium?
- Difference b/w getText() and getAttribute() in Selenium WebDriver
