Web Automation Using Selenium
  • About The Book
  • Selenium
    • Introduction
      • What is testing and why?
      • What is Selenium and Why?
    • Getting Started
      • Audience
      • Prerequisite
      • Set up
      • Getting Started - Hello World..!!
      • What are drivers
    • Locators
      • CSS Selectors
      • XPath Selector
    • WebDriver
      • WebDriver Methods
      • WebDriver Types
    • WebElement(s)
      • WebElement Methods
      • Looping Through WebElements
    • Waits In Selenium
  • TestNG
    • Introduction
    • TestNG Setup
    • First Test Script
    • Some of the features of TestNG
    • TestNG Annotations
      • @Test
      • @DataProvider
  • Maven
    • Introduction
  • Framework Development
    • Introduction
    • Building Framework
      • Technology Stack
      • Page Object Model (POM)
      • Setup
      • What our framework contain
      • Packages
        • Context
        • Factory
        • Listeners
        • Pages
      • Creating first automation test
  • Common Interview Questions
    • Selenium-Related
Powered by GitBook
On this page

Was this helpful?

  1. TestNG

Introduction

Introduction about TestNG

TestNG is a testing framework just like JUnit and NUnit but with more features and easily extensible. Unlike JUnit and NUnit which are mainly used by developers for their unit tests, TestNG can be used in unit testing, integration testing end to end testing. And mainly it addresses all the drawbacks that are present in JUnit (Listeners, Dependency Injection, etc.,).

Some of the main features of TestNG

  1. Annotation Based.

  2. Support of native dependency injection.

  3. Support for integration with multiple dependency injection frameworks like Guice (by default), Spring etc.,

  4. Easy to log and report using Listeners.

  5. Better control over test execution with the use of groups, dependencies, suites etc.,

  6. Easy to adopt data driven testing with use of DataProvider .

  7. Excellent handle for parallel execution.

We'll talk about each of these features in detail.

PreviousWaits In SeleniumNextTestNG Setup

Last updated 4 years ago

Was this helpful?