Introduction to TestNG.
TestNG is like a unit test in selenium.By using testng annotations we can invoke our test as we need.If we have 20 testcases and we need to run only 18.So we can skip the other two test.This can be done with the help of TestNG.We can run multilple testcases in a single batch file.In selenium if we write methods for our scripts.If any one one fails then excecution stop at that time but if we use TestNG then TestNG reports failure Testcaseand execute other tests.
We can use TestNG annotations according to our needs.
1.Testng is a framework itself.
2.Testng is a controller of Selenium.
3.Testng gives us very good Reports
4.Writing testcases in java mode sometime difficult to write.
5.TestNG annotations makes Testers selenium scripts easier.
6 TestNG has no main Method as in java.
Advantages:
1.Very good reporting structure is available
2.Can generate XML, HTML reports














