In this page, I will walk you through TestNG Tutorials which will help you to write efficient scripting in Selenium Webdriver.Most of the guys you have heard TestNG ,Junit,Nunit and you might be having so much curiosity about it.
1-TestNG, Junit, Nunit are a separate testing framework which is freely available in the market.
2-TestNG, JUnit mainly we can integrate into Java whereas NUnit works with C# only.
3-Junit comes by default with Eclipse but TestNG you have to install an Add-ons.
4-Junit has fewer annotations as compared to TestNG.
5-Junit automatically does not create HTML report so we have to use ant build tool, but TestNG has rich HTML report generations even for single test case it creates 3 HTML reports
we have so much difference please refer their official website you will get a clear picture that how it works.
Note- TestNG is successor of Junit so I will be focusing on TestNG
Official website for Junit is- http://junit.org/
Official website for TestNg is- http://testng.org/
Official website for NUnit is- http://www.nunit.org/
What is TestNG and Why we have to use in Selenium
Ans- TestNG is a testing framework which is designed to cover all categories of tests: unit, functional, end-to-end, integration, etc…
We can combine TestNG with Selenium and we can write Test Cases in Eclipse using Java.
TestNG Tutorials for beginner
Some of the TestNG feature as listed below
1- Annotation- It support multiple annotations at a various level so we will discuss in the separate post.
2- Support for data-driven testing (with @DataProvider)
3- Support for parameters.
4- Generate automatic reports
5- We can run failed test case only using testng.xml no need to run the full test suite in case of failure
6- Supported by a variety of tools and plug-ins (Eclipse, IDEA, Maven, etc…).
7- Default JDK functions for runtime and logging (no dependencies).
8- Dependent methods for application server testing.
I have very details video on TestNG which will help you to get started