---
title: "Install TestNG In Eclipse & IntelliJ?"
description: "**Install TestNG In Eclipse & IntelliJ?** **1. Installing TestNG in Eclipse** A. Via Eclipse Marketplace (recommended) 1. **Help → Eclipse Marketplace…** 2. Search for **“TestNG”** 3. Click **Install** on the “TestNG for Eclipse” entry 4. Follow the prompts and restart…"
url: "https://vinothqaacademy.com/docs/install-testng-in-eclipse-intellij/"
updated: "2025-10-01"
category: TestNG Framework
tags:
  - Testng Framework
---

# Install TestNG In Eclipse & IntelliJ?

**Install TestNG In Eclipse & IntelliJ?**

**1. Installing TestNG in Eclipse**

A. Via Eclipse Marketplace (recommended)

1. **Help → Eclipse Marketplace…**
2. Search for **“TestNG”**
3. Click **Install** on the “TestNG for Eclipse” entry
4. Follow the prompts and restart Eclipse when prompted

B. Via Update Site

1. **Help → Install New Software…**
2. **Work with:** https://testng.org/testng-eclipse-update-site
3. Check **TestNG** in the list, click **Next**, accept licenses, and finish
4. Restart Eclipse

C. Add TestNG to Your Project

- **Plain Java (no build tool):**
  - Right-click your project → **Build Path → Add Libraries…** → choose **TestNG**
- **Maven:** add to your pom.xml:

```xml

                <dependency>

  <groupId>org.testng</groupId>

  <artifactId>testng</artifactId>

  <version>7.7.0</version> <!-- or latest -->

  <scope>test</scope>

</dependency>
```

then Project → Maven → Update Project

- **Gradle:** add to build.gradle:

```javascript

                dependencies {

  testImplementation 'org.testng:testng:7.7.0'

}

test {

  useTestNG()

}
```

**2. Installing TestNG in IntelliJ IDEA**

*A. Enable/Install the TestNG Plugin*

1. **File → Settings (****⌘****, on macOS) → Plugins**
2. Search for **“TestNG”**
3. If not installed, click **Install**; otherwise ensure it’s **Enabled**
4. Restart IDEA if prompted

**Note:** IntelliJ Ultimate bundles TestNG support by default. In Community Edition you may need the plugin.

*B. Add TestNG to Your Project*

- **Maven:** same pom.xml snippet as above; then **Maven → Reimport**
- **Gradle:** same build.gradle snippet; then **Reload Gradle Project**
- **Plain Java:**
  1. **File → Project Structure → Libraries**
  2. Click **+ → From Maven…**, search org.testng:testng:7.7.0, add it
  3. Apply and close

*C. Creating a TestNG Run Configuration*

1. **Run → Edit Configurations…**
2. Click **+ → TestNG**
3. Give it a name (e.g. “All Tests”); choose **Suite**, **Package**, **Class**, or **Method**
4. If using an XML suite, point **Suite** to your testng.xml
5. Apply and **Run**

**3. Verify Your Setup**

1. Create a simple TestNG class:

```javascript

                import org.testng.annotations.Test;

public class HelloTest {

  @Test

  public void hello() {

    System.out.println("TestNG is working!");

  }

}
```

2. Right-click the class → **Run ‘HelloTest’** (Eclipse) or click the green ▶ (IntelliJ).

3. You should see TestNG results in the console / TestNG Results view.

*With those steps you’ll have TestNG installed, added to your project’s classpath, and ready to write & run your Selenium (or any) tests!*
