Introduction Of TestNG - Unit Testing Framework For Selenium WebDriver

TestNG is unit testing framework and it has been most popular in very sort time among java software developers and selenium webdriver software automation test engineers. I can say, TestNG has not only most of all the features of JUnit but also many more advanced features in terms of selenium webdriver testing framework. Basically,
TestNG's software unit testing framework development is inspired from combination of NUnit and JUnit. You can VIEW JUNIT WITH WEBDRIVER TUTORIALS AND EXAMPLES before going to learn TestNG framework. There are many new features in TestNG which makes it more powerful, stronger and easier to use. VIEW SIMILARITIES AND DIFFERENCES between TestNG and JUnit.

TestNG Major Features
  • TestNG has a built in multiple Before and After and other annotations like @BeforeSuite, @AfterSuite, @BeforeTest, @BeforeGroups, @DataProvider, @Parameters, @Test etc.. All the TestNG annotations are very easy to understand and implement. We will look each and every annotation with detailed description in my latter posts.
  • We can configure dependent test methods in TestNG means TestTwo() is dependent to TestOne(). We can also configure that if earlier test method (TestOne()) fails during execution then dependent software test method(TestTwo()) has to be executed or not.
  • There is not required to extend any class in TestNG.
  • We can configure our test suite using test methods, classes, packages, groups, etc.. in single testng.xml file.
  • Support of configuring test groups like backendtest-group, frontendtest-group etc.. and we can tell TestNG to execute only specific group/groups.
  • TestNG is supported by many tools and plug-ins like Eclipse, Maven, IDEA, etc..
  • TestNG support parallel testing, Parameterization (Passing parameters values through XML configuration), Data Driven Testing(executing same test method multiple times using different data) .
  • TestNG has built in HTML report and XML report generation facility. It has also built in  logging facility.
VIEW MORE TESTNG TUTORIALS

All these are major features of TestNG software unit testing framework and some of them are available in JUnit too. I recommend you to use  TestNG framework with WebDriver test because there are many useful features available in it compared to JUnit. Read my latter posts to learn TestNG framework with its detailed features.

2 comments:

  1. Nice tutorials man, hats off.

    ReplyDelete
  2. Great efforts, please keep sharing such more article.
    It is very much helpful.

    Reply

    ReplyDelete