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

TestNG Setup

PreviousIntroductionNextFirst Test Script

Last updated 4 years ago

Was this helpful?

Prerequisite:

  1. Java8 installed.

  2. Maven installed.

1. Eclipse Editor

  1. Download eclipse from . Note: Do not install package more than 2020-06 as they are not compatible with Java 8.

  2. After downloading eclipse, download TestNG plugin from update site Help > Install New Software > and paste the above URL

2. Create New Maven project.

3. Add TestNG dependency.

<!-- https://mvnrepository.com/artifact/org.testng/testng -->
<dependency>
    <groupId>org.testng</groupId>
    <artifactId>testng</artifactId>
    <version>7.3.0</version>
    <scope>test</scope>
</dependency>

Once after the setup your editor should look something like this with no errors (If you are using eclipse).

That's it. We can start using TestNG.

here
https://dl.bintray.com/testng-team/testng-eclipse-release/
Project Structure