What to answer if someone asks both TestNG and Hybrid(Data Driven and Keyword driven etc) are frameworks how will you differentiate both of them?
1 Answers
Keyword Driven Keyword Driven Framework is a type of Functional Automation Testing Framework which is also known as Table-Driven testing or Action Word based testing. The basic working of the Keyword Driven Framework is to divide the Test Case in to four different parts. First is called as Test Step, second is Object of Test Step, third is Action on Test Object and fourth is Data for Test Object.
In other words, Keyword driven framework in an approach which you can write in any language. The main goal is to bind an keyword with an even like suppose you need to send your text to an textbox. Now you can select an keyword like sendText, now internally you bind this keyword with sendKeys. In excel sheet you will mention sendText and keyword framework will identify that you want use sendkeys events.
TestNg:-
TestNG is a testing framework inspired from JUnit and NUnit but introducing some new functionalities that make it more powerful and easier to use, such as:
Annotations. Run your tests in arbitrarily big thread pools with various policies available (all methods in their own thread, one thread per test class, etc...). Test that your code is multithread safe. Flexible test configuration. Support for data-driven testing (with @DataProvider). Support for parameters. Powerful execution model (no more TestSuite). Supported by a variety of tools and plug-ins (Eclipse, IDEA, Maven, etc...). Embeds BeanShell for further flexibility. Default JDK functions for runtime and logging (no dependencies). Dependent methods for application server testing.
In other words, TesNG is a plug-in for eclipse. It's has some annotation by using that you can run your scripts. It's java eclipse specific. It is not only design for selenium
Hope it will help you :)

- 16,610
- 15
- 78
- 125
-
Thanks for your time and detailed explanation @Shubham Jain – Lokesh May 25 '16 at 10:03